Bmp sizes?

Alright, this may be a newB question to some of you, but i don’t really give a ****. So i ask you… Are there certain sizes the bmp has to be to load, cause i can’t seem to load them unless the dimensions are 1-2-4-8-16-32-64-128-256-512-1024 etc… If not, how do I load other pics, if so WTF that’s gay

Well when you say you can’t load them what do you mean? Do they come out looking skewed?

Because bmp files have there width rounded up to… (the rounded width is dependant on the number of bits per pixel).

You may also speak normally without the curses.

All implementations of OpenGL should at least support textures of 64^2.
512^2 is the common limit, and you can get the maximum size that your 3d card can handle by using glGet(GOOGLE).

You can’t load images with sizes other than a power of 2 because of speed/optimisation reasons.
(non-gayish solution: you can use more textures and split your image, stretch the image, or use the NVIDIA texture rectangle extension)

Oh and this ‘limit’ is for all current 3D API’s (OpenGL, <dirty>X).

So are we assuming that you are using the bmp files as textures… because if you are then I believe that may be a limitation of texture maps and not your bmp reading…

yeah, i was just usin them as textures, and they would load i guess, just come up white, instead of the right pic, ummm i solved it by just taked the dimensions of the pic i wanted and stretchin it to a bigger size, ie 100 becomes 128 and 200 becomes 256, then making the thing i was texturin the right size so it would unstrech and look good, thnx for ur help guys

May I suggest that you read a few documents about opengl before just throwing anything at it. Try the Red Book (still online). try msdn.microsoft.com
try nvidia.com and ati.com
One day u will decide to load tga, png, jpg and other formats. The answer is no, opengl cant load them for u and they will have to be power of 2.

If this power of 2 **** pisses you off like it has pissed off a lot us, then use the mother ****ing gluBuild2DMipmaps or gluScaleImage function.

V-man

V-man: why using glu(t) ? IJG does all for you, loads multiple formats, and stretches them if you want …