If I understand correctly, you can attach textures to an FBO and then use glDrawBuffers
to link those attachment points to (fragment) shader output indices. Where is this latter state stored after a glDrawBuffers
call? The currently bound shader, FBO, or is it a global OpenGL state?
glDrawBuffer(s)
sets framebuffer object state.