Sign in to follow this  
brucile

is it possible to update part of texture attached to FBO?

Recommended Posts

brucile    122
it is possible to update different part of texture of FBO in different passes? for example, the texture is 100 x 100. we first draw a quad convering 10 x100, then another 90 x 100. when updating 10 x 100 region, value in other part will be changed ? Thanks.

Share this post


Link to post
Share on other sites
oggialli    217
It should work. Rendering multiple passes is actually no different from just rendering multiple batches of things from the GPU's POV. So just as well as rendering a quad after another in a pass, a quad in a pass and another in a different pass should work just as well.

Are you sure you aren't reading from the texture while drawing to it (it's not bound to GL_TEXTURE_WHATEVER and GL_TEXTURE_WHATEVER isn't enabled)? That, for one, could cause your problems.

Share this post


Link to post
Share on other sites
Niwak    208
I'm not sure of the meaning of your question. What I think you are asking is ; can I use a texture simultaneously as attached to the active framebuffer and as a bound texture (i.e. source for drawing and destination of rendering).

If it's your question, the enaswer is in the specification of FBO (issue #44) ; the result of this behavior will be undefined.

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