Reputation: 3889
For Example when I do:
glDrawBuffer(GL_COLOR_ATTACHMENT0)
Does I have to call it on a per frame buffer basis or is it a global state for every frame buffer? The documentation is not clear about it.
Upvotes: 1
Views: 720
Reputation: 45332
To quote the GL 3.3 core profile spec (section 4.2.1 "Selecting a buffer for writing"):
The state required to handle color buffer selection for each framebuffer is an integer for each supported fragment color.
This is a per-framebuffer state. Note that you never have to set any state per frame in OpenGL, as OpenGL does not even have a concept of a "frame".
Upvotes: 3