Controls the writing of individual bits in the color index buffers.
OpenGL C bindings library: libGL.a
void glIndexMask(GLuint Mask)
Mask | Specifies a bit mask to enable and disable the writing of individual bits in the color index buffers. Initially, the mask is all 1's. |
The glIndexMask subroutine controls the writing of individual bits in the color index buffers. The least significant n bits of the Mask parameter, where n is the number of bits in a color index buffer, specify a mask. Wherever a 1 (one) appears in the mask, the corresponding bit in the color index buffer (or buffers) is made writable. Where a 0 (zero) appears, the bit is write-protected.
This mask is used only in color index mode, and it affects only the buffers currently selected for writing (see glDrawBuffer). Initially, all bits are enabled for writing.
GL_INVALID_OPERATION | The glIndexMask subroutine is called between a call to glBegin and the corresponding call to glEnd. |
Associated gets for the glIndexMask subroutine are as follows. (See the glGet subroutine for more information.)
glGet with argument GL_INDEX_WRITEMASK.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glColorMask subroutine, glDepthMask subroutine, glDrawBuffer subroutine, glIndex subroutine, glStencilMask subroutine.