The glClearIndex function specifies the clear value for the color-index buffers.
void glClearIndex(
GLfloat c
);
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
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. |
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.
glBegin, glClear, glEnd, glGet