My search-fu isn’t the best so apologies if this has already been clearly covered somewhere.
I’m trying to get multiple render targets working. As the title indicates, I’m having no luck getting anything written to the 2nd or 3rd COLOR_ATTACHMENTs.
A few quick questions, when answered will probably help me out:
Is it necessary to call glBindFragDataLocation? If so, should it be called before or after linking the shader program?
Is it necessary to call glDrawBuffers? If so, is there a prescribed point at which it should be called? e.g. before of or after the call to glBindFramebuffer?
Is it necessary to call glDrawBuffer( GL_BACK ) when preparing to render to the default window’s back buffer? If so, like #2 should it be called before or after glBindFrameBuffer( GL_FRAMEBUFFER, 0 )?
The 3.1 spec indicates that GL_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are to be treated the same. Should one be preferred over the other?