Jump to content
  • Advertisement
Sign in to follow this  
JohnnyCode

width and height of FBO

This topic is 3417 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

hello, I am trying to render to a texture, but it seems I need to have the texture's width and height exactly of the same value as the width and height of my window render buffer. But my window render target dimensions are not a power of two and function glTexImage2d needs powers of two. Is there a way of how to set FBO bound texture dimensions to whatever value I want and have a correct render to it?

Share this post


Link to post
Share on other sites
Advertisement
If your GPU supports NPT textures (and almost all modern GPUs do), then you can supply any size to glTexImage2D. It doesn't have to be a power of two. Check for the ARB_texture_non_power_of_two extension.

And of course your FBO dimensions (or better: the dimensions of the attached textures or render buffers) don't need to match your render window size.

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!