glDrawBuffer/glReadBuffer framebuffer state

Hello,

are changes made with glDrawBuffer or glDrawBuffers stored in the state of current GL_DRAW_FRAMEBUFFER
and changes made with glReadBuffer stored in the state of current GL_READ_FRAMEBUFFER?

So for example this code

glBindFramebuffer(GL_READ_FRAMEBUFFER, BufferA);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, BufferB);
glReadBuffer(GL_FRONT);

would only change the state of BufferA?

Thanks!

glWriteBuffer/glWriteBuffers/glReadBuffer are global states and are not bound to framebuffer objects.

This is incorrect.

glDrawBuffer/glReadBuffer state is tracked in framebuffer objects. Open your spec and check the state table near the end. Look at the “Framebuffer (state per framebuffer object)” table.

[QUOTE=RealtimeSlave;1258257]
are changes made with glDrawBuffer or glDrawBuffers stored in the state of current GL_DRAW_FRAMEBUFFER
and changes made with glReadBuffer stored in the state of current GL_READ_FRAMEBUFFER?[/QUOTE]
Correct.

You can quickly verify this, binding different frame buffers, changing state, and introspecting with glGetIntegerv.

Thanks for the clarification!