[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glColorMask Subroutine

Purpose

Enables and disables the writing of frame buffer color components.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glColorMask(GLboolean Red, GLboolean Green, GLboolean Blue, GLboolean Alpha)

Parameters

Red Specifies whether red can or cannot be written into the frame buffer. The default value is True, indicating that the red color component can be written.
Green Specifies whether green can or cannot be written into the frame buffer. The default value is True, indicating that the green color component can be written.
Blue Specifies whether blue can or cannot be written into the frame buffer. The default value is True, indicating that the blue color component can be written.
Alpha Specifies whether alpha can or cannot be written into the frame buffer. The default value is True, indicating that the alpha color component can be written.

Description

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.

Errors

GL_INVALID_OPERATION The glColorMask subroutine is called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

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.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glColor subroutine, glDepthMask subroutine, glIndex subroutine, glIndexMask subroutine, glStencilMask subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]