glIndex.3   [plain text]


'\" te  
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp May 22 14:45
.ds Dm 1 May 22 14:
.ds Xs 37923     4
.TH GLINDEX 3G
.SH NAME
.B "glIndexd, glIndexf, glIndexi, glIndexs, glIndexub, glIndexdv, glIndexfv, glIndexiv, glIndexsv, glIndexubv
\- set the current color index

.P
.SH C SPECIFICATION
void \f3glIndexd\fP(
GLdouble \fIc\fP )
.nf
.fi
void \f3glIndexf\fP(
GLfloat \fIc\fP )
.nf
.fi
void \f3glIndexi\fP(
GLint \fIc\fP )
.nf
.fi
void \f3glIndexs\fP(
GLshort \fIc\fP )
.nf
.fi
void \f3glIndexub\fP(
GLubyte \fIc\fP )
.nf
.fi

.SH PARAMETERS
.TP \w'\f2c\fP\ \ 'u 
\f2c\fP
Specifies the new value for the current color index.
.P
.SH C SPECIFICATION
void \f3glIndexdv\fP(
const GLdouble \fI*c\fP )
.nf
.fi
void \f3glIndexfv\fP(
const GLfloat \fI*c\fP )
.nf
.fi
void \f3glIndexiv\fP(
const GLint \fI*c\fP )
.nf
.fi
void \f3glIndexsv\fP(
const GLshort \fI*c\fP )
.nf
.fi
void \f3glIndexubv\fP(
const GLubyte \fI*c\fP )
.nf
.fi

.SH PARAMETERS
.TP
\f2c\fP
Specifies a pointer to a one-element array that contains
the new value for the current color index.
.SH DESCRIPTION
\%\f3glIndex\fP updates the current (single-valued) color index.
It takes one argument, the new value for the current color index.
.P
The current index is stored as a floating-point value. 
Integer values are converted directly to floating-point values,
with no special mapping.
The initial value is 1. 
.P
Index values outside the representable range of the color index buffer
are not clamped.
However,
before an index is dithered (if enabled) and written to the frame buffer,
it is converted to fixed-point .
Any bits in the integer portion of the resulting fixed-point value
that do not correspond to bits in the frame buffer are masked out.
.SH NOTES
\%\f3glIndexub\fP and \%\f3glIndexubv\fP are available only if the GL version is
1.1 or greater.
.P
The current index can be updated at any time.
In particular,
\%\f3glIndex\fP can be called between a call to \%\f3glBegin\fP and the corresponding
call to \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_CURRENT_INDEX\fP
.SH SEE ALSO
\%\f3glColor\fP,
\%\f3glIndexPointer\fP