/ comp / gb.opengl / gl / colormask
Gl.ColorMask (gb.opengl)
Syntax

    STATIC SUB ColorMask ( Red AS Boolean, Green AS Boolean, Blue AS Boolean, Alpha AS Boolean )

### Enable and disable writing of frame buffer color components

#### Parameters

- Red, Green, Blue, Alpha specify whether red, green, blue, and alpha can or cannot be written into the frame buffer. The default values are all TRUE, indicating that the color components can be written.

#### Description

Gl.ColorMask specifies whether the individual color components in the frame buffer can or cannot be written. If red is 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.

#### Errors

Gl.GL_INVALID_OPERATION is generated if Gl.ColorMask is called between a call to Gl.Begin and the corresponding call to Gl.End.

#### Associated Gets

Gl.GetColorWritemask
Gl.GetRgbaMode

### See also

Gl.Color3f , Gl.Index, Gl.IndexMask, Gl.DepthMask, Gl.StencilMask