PDA

View Full Version : glColorMask and glDepthMask



_arts_
09-12-2011, 07:51 AM
hi,

from the tests I made, these functions work on "global" OpenGL state machine, meaning that calling them affect every framebuffer, not only the currently bound framebuffer.

I've searched on Internet but the man pages are not really explicit about the behavior. For example, from http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml :



glColorMask specifies whether the individual color components in the frame buffer can or cannot be written.


Since they talk about frame buffer (yes I know "frame buffer" and not "framebuffer object" ...) it's a bit surprising for me. I would expect them to affect the bound framebuffer only. I think I just misunderstood the sentance.

What do you think about this ?

arekkusu
09-12-2011, 08:30 AM
The state that is tracked with the currently bound framebuffer is listed in 4.2 Table 6.60 ("Framebuffer Dependent Values".)

_arts_
09-13-2011, 07:43 AM
You're right, the fbo documentation says about this, too. Thanks.