Sign in to follow this  
celios

OpenGL Texture size problem

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this