Jump to content
  • Advertisement
Sign in to follow this  
celios

OpenGL Texture size problem

This topic is 4086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!