Name
gl.ColorMask -- enable and disable writing of frame buffer color components
Synopsis
gl.ColorMask(red, green, blue, alpha)
Function
gl.ColorMask() specifies whether the individual color components in the frame buffer can or cannot be written. If red 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. The initial values are all #GL_TRUE, indicating that the color components can be written.

Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.

Please consult an OpenGL reference manual for more information.

Inputs
red
specify whether red can or cannot be written into the frame buffer
green
specify whether green can or cannot be written into the frame buffer
blue
specify whether blue can or cannot be written into the frame buffer
alpha
specify whether alpha can or cannot be written into the frame buffer
Errors
#GL_INVALID_OPERATION is generated if gl.ColorMask() is executed between the execution of gl.Begin() and the corresponding execution of gl.End()

Associated gets
gl.Get() with argument #GL_COLOR_WRITEMASK

gl.Get() with argument #GL_RGBA_MODE


Show TOC