Sign in to follow this  
JohnnyCode

width and height of FBO

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

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