glIndexMask function

The glIndexMask function controls the writing of individual bits in the color-index buffers.

Syntax


void WINAPI glIndexMask(
   GLuint mask
);

Parameters

mask

A bit mask to enable and disable the writing of individual bits in the color-index buffers. Initially, the mask is all ones.

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

The function was called between a call to glBegin and the corresponding call to glEnd.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

The function was called between a call to glBegin and the corresponding call to glEnd.

Remarks

The glIndexMask function controls the writing of individual bits in the color-index buffers. The least significant n bits of mask, where 1 is the number of bits in a color-index buffer, specify a mask. Wherever a one appears in the mask, the corresponding bit in the color-index buffer (or buffers) is made writable. Where a 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.

The following function retrieves information related to glIndexMask:

glGet with argument GL_INDEX_WRITEMASK

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Gl.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

glBegin
glDepthMask
glDrawBuffer
glEnd
glIndex
glStencilMask

 

 

Show: