Texture size problem

Started by
3 comments, last by Nicholas Christopher 16 years, 11 months ago
I am doing a video application using OpenGL, and almost all texture functions require that the dimension be something to the power of 2. Not even popular screen resolutions are power of 2. Strange requirement. The only function that does not require that is gluBuild2DMipmaps, but if I do this that means I have to create textures for every frame ( and eventually run out of memory) instead of creating only one texture and re-using it for every frame. Does anybody know any other texturing functions that does not require power of 2 dimensions ? Thanks, celios
Advertisement
The power of two requirement does not depend on the function used; it is the texture object itself that had this requirement. Ultimately, there's only one single way to create a texture in OpenGL; the variants of glTexImage (for different number of dimensions). Other ways to upload texture data is either implemented in terms of these functions, or only functions to upload new data to existing textures (the sub-area updated doesn't have to be a power of two, but the texture being updated had to).

But since OpenGL 2.0, there are no power of two requirement anymore. Just upload your texture.
Thanks for the advice, but unfortunately I have to stick with the non power of 2
textures.

How do I get the OpenGL 2.0 ? I looked around opengl.org and can't find any
link to the SDK.
First off do you have a GL2.0 card? And you need latest drivers for your Gfx card. And you should be good to go.
celios ,

look into GL_TEXTURE_RECTANGLE_ARB or GL_TEXTURE_RECTANGLE_NV
you will find many examples using it on the net.

Nicholas ChristopherArchitecture Software Developer, 3D Modelerhttp://www.arconovum.com

This topic is closed to new replies.

Advertisement