2
\$\begingroup\$

I wanted to know what the better approach would be for post-processing: swapping between framebuffers or swapping between textures attached to one framebuffer?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

It's almost always better to change a state's object instead of changing an object's state. Mostly for readability, as thats how GL is expected to be used. Even if you have multiple attachments in common between FBOs, I would still suggest binding them to each FBO.

As for performance, its implementation dependent, but framebufferTexture is likely slower due to it having to compute the mapping for the fragment outputs into the texture, while a complete framebuffer already has this mapping computed and just needs to load it.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .