glClearIndex

The glClearIndex function specifies the clear value for the color-index buffers.

void glClearIndex(
  GLfloat c   
);
 

Parameters

c
The index used when the color-index buffers are cleared. The default value is zero.

Remarks

The glClearIndex function specifies the index used by glClear to clear the color-index buffers. The c parameter is not clamped. Rather, c is converted to a fixed-point value with unspecified precision to the right of the binary point. The integer part of this value is then masked with 2^m – 1, where m is the number of bits in a color index stored in the frame buffer.

The following functions retrieve information related to glClearIndex:

glGet with argument GL_INDEX_CLEAR_VALUE

glGet with argument GL_INDEX_BITS

Error Codes

The following are the error codes generated and their conditions.

Error Code Condition
GL_INVALID_OPERATION glClearIndex was called between a call to glBegin and the corresponding call to glEnd.

QuickInfo

  Windows NT: Use version 3.5 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in gl.h.
  Import Library: Link with opengl32.lib.

See Also

glBegin, glClear, glEnd, glGet