Enables and disables the writing of frame buffer color components.
OpenGL C bindings library: libGL.a
void glColorMask(GLboolean Red, GLboolean Green, GLboolean Blue, GLboolean Alpha)
The glColorMask subroutine specifies whether the individual color components in the frame buffer can or cannot be written. If the Red parameter is GL_FALSE, for example, no change is made to the red component of any pixel in any of the color buffers, regardless of the drawing operation attempted.
Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.
GL_INVALID_OPERATION | The glColorMask subroutine is called between a call to glBegin and the corresponding call to glEnd. |
Associated gets for the glColorMask subroutine are as follows. (See the glGet subroutine for more information.)
glGet with argument GL_COLOR_WRITEMASK
glGet with argument GL_RGBA_MODE.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glColor subroutine, glDepthMask subroutine, glIndex subroutine, glIndexMask subroutine, glStencilMask subroutine.