Sign in to follow this  

width and height of FBO

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

This topic is 3202 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.

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