3D sprites, textures sizes...

Does anyone know how I can use a texture that is not to the power of 2?

I have written my first 3D sprite library in OpenGL, it supports for all the normal stuff, plus real-time anti-aliasing, but at the moment I’m restricted to 16x16, 32x32, 64x64, 128x128, 256x256, etc…

Both ‘the red book’ and the relevant examples on the nehe site say there are ways around this, but don’t say what they are or where to find them…

BTW, your textures don’t have to be square. Any combination of power-of-two works as long as GL_MAX_TEXTURE_SIZE is not exceeded.

Check this out for non power-of-two textures. http://oss.sgi.com/projects/ogl-sample/registry/NV/texture_rectangle.txt

You can only use power of two sized textures, but you can store several sprites in one texture using subtextures and use them separately with appropriate texture coordinates …
Hope this helps

Be careful, mip-mapping becomes a major hassle if you store multiple sub-textures in one image.