Texture: Power of 2 work around

Hi all,
Is there any work around for the power of 2 texture dimensions restriction?

thanks,

Malakh.

Look into the extension NV_texture_rectangle.
http://www.nvidia.com/dev_content/nvopenglspecs/GL_NV_texture_rectangle.txt

Pad a non 2^n texture with zeros, then ratio accordingly when you attach the texture to your poly. Works fine, but can waste a fair bit of mem as in 1025 would have to be padded to 2048 and so on…

The easiest is gluBuild2DMipmaps which scales the image and creates mipmaps at the same time. Otherwise, use gluScaleImage but you need to figure out the widthout heightout values yourself. I personallly scale up:

example:
widthin=500
heightin=200

becomes

widthout=512
heightout=256

V-man