Non Power of 2 texture maps

I’m having some problems with NPO2 textures. This problem occurs on Windows and Linux. On windows I have a Quadro FX3400, using the nvidia 8198 driver. On linux I have a GeForce 7800 GTX using nvidia driver 7676.

I get the extensions string and search for GL_ARB_texture_non_power_of_two; which is found. So when I load the texture maps I do not scale them to be a power of 2.

This works as long as the width is a power of 2, but if both the width and height are not a power of 2 the resulting image is incorrect.

Is there a limitation I missed?

Thanks for the help

Try calling glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ) before setting up your textures.

Bingo! Thanks.