문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top