[BH]boogieman

12-01-2003, 10:36 AM

I've seen in games before where textures have been used that did not necessarily have dimensions that were powers of 2. Also, I've seen many where the height and width differ.

I'm having trouble getting this to work for me. OpenGL tells me (as do several other sources), that the images must have dimensions that are powers of 2, and that the height and width must be equal.

So my question is how is this situation handled. How do artists make rectangular images and use them in OpenGL? Or rather, how does the programmer typically solve this? Do they stretch the image to the next largest power of 2 and stretch it to make it square? Is there some OpenGL state I have to enable for this to work? Or is there some OpenGL function that loads the image differently?

Any help would be greatly appreciated.

Thanks!

I'm having trouble getting this to work for me. OpenGL tells me (as do several other sources), that the images must have dimensions that are powers of 2, and that the height and width must be equal.

So my question is how is this situation handled. How do artists make rectangular images and use them in OpenGL? Or rather, how does the programmer typically solve this? Do they stretch the image to the next largest power of 2 and stretch it to make it square? Is there some OpenGL state I have to enable for this to work? Or is there some OpenGL function that loads the image differently?

Any help would be greatly appreciated.

Thanks!