Resizing a texture


I want to resize a texture, if the texture size is not supported by hardware.

glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxtexturesize);

Lets say m_maxtexturesize = 256 and i want to load an 512x512 image. How can i size it down to 256x256?

Thanks, Austrian Coder

Just take a look at this post earlier:

gluScaleImage will do what you want …