Update: Thanks for the input. I'll be going with the solution that makes the most sense, which is using multiple FBOs. But I'd be glad if someone could address the statements made by Songo which I referenced below.
I'm currently working on a rendering pipeline that has to support many different stages which need FBOs. Namely shadow mapping, deferred rendering and post processing. The post processing part is about to be finished and I'll start working on the other parts soon.
At the moment the whole post processing pipeline is using a single FBO and just switches between attachments to combine different effects. Of course I'm planning to add some bench marking code in the long run to analyze the efficiency of the pipeline, but I might as well go ahead and ask you guys too.
The question: What is the most efficient way to use an FBO in desktop opengl?
Create a seperate FBO for each texture you want to render to.
Switch using BindFramebuffer()
Single FBO, multiple texture attachments
textures should have same format and dimensions
use FramebufferTexture() to switch between textures
Single FBO multiple texture attachments
attach textures to different color attachments
use glDrawBuffer() to switch rendering to different color attachments
The question is exactly the same one asked here. That is why I didn't open a new one over on SO. It is from February 2010 though (almost 4 years) and the NVIDIA presentation that quoted there is from 2005! It might be that nothing has changed since then but that's still quite some time that's passed.
Also two follow up questions about the second and third points above:
Is there a reason why the second method specifies "textures should have the same format and dimensions" and the third one doesn't?
Also about the same line as the first question: The same dimension and formats are only required for attachments that are used together right? This shouldn't affect the following example: attaching a small texture, rendering into it, attaching an other, larger texture and rendering a second time.
I know the second one here is possible (since that's how I'm using it at the moment) but it might not be the best way.