Question

Can the same texture be bound to more than one framebuffer object? I need to write on some texture in a multi target rendering pass with a certain fbo, and later to add some blending to just one of those texture, so I need a second framebuffer object with that texture bound to.

Was it helpful?

Solution

I have no idea why you would think that you can't attach a texture to multiple FBOs. So yes, you can.

However, you shouldn't need to for your purposes. You don't have to write to all of the images attached to an FBO. You control what images get written to with glDrawBuffers. You can even selectively enable and disable blending to certain draw buffers, if you need to write to multiple buffers but only blend with certain ones.

So yes you can, but you shouldn't bother. Just switch your draw buffers, unless you need a new depth buffer or something.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top