I wonder since a long time what would be the best way to handle OpenGL FrameBuffer Objects (FBO).
Switching FBOs can be costly but defining new attachments too.
How do you do it fast ?
I hesitate between these 3:
1 FBO for everything, change attachment but don't switch between FBOs
1 FBO for each render target (size + format) in the rendering path. That means i will reuse the same FBO for similar render targets. But this way a custom blur would cost 4+ FBOs.
1 FBO for each render target, set attachments only once and then switch between FBOs
Also, should I minimize the number of FBO switches (like I minimize the number of texture bindings) ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…