5
.ds Dt 24 September 1999
9
.ds Xs 54341 6 indexpointer.gl
13
\- define an array of color indexes
16
void \f3glIndexPointer\fP(
19
.ta \w'\f3void \fPglIndexPointer( 'u
21
const GLvoid \fI*ptr\fP )
28
.TP \w'\fIstride\fP\ \ 'u
30
Specifies the data type of each color index in the array.
32
\%\f3GL_UNSIGNED_BYTE\fP,
37
are accepted. The initial value is \%\f3GL_FLOAT\fP.
40
Specifies the byte offset between consecutive color indexes.
41
If \f2stride\fP is 0 (the initial value), the color indexes are understood to
42
be tightly packed in the array.
43
The initial value is 0.
46
Specifies a pointer to the first index in the array.
47
The initial value is 0.
49
\%\f3glIndexPointer\fP specifies the location and data of an array of color indexes
50
to use when rendering.
51
\f2type\fP specifies the data type of
52
each color index and \f2stride\fP gives the byte stride from one
53
color index to the next allowing vertices and attributes
54
to be packed into a single array or stored in separate arrays.
55
(Single-array storage may be more efficient on some implementations;
56
see \%\f3glInterleavedArrays\fP.)
58
\f2type\fP, \f2stride\fP, and \f2ptr\fP are saved as client-side
61
The color index array is initially disabled. To enable and disable
62
the array, call \%\f3glEnableClientState\fP and
63
\%\f3glDisableClientState\fP with the argument \%\f3GL_INDEX_ARRAY\fP. If
64
enabled, the color index array is used when \%\f3glDrawArrays\fP,
65
\%\f3glDrawElements\fP or \%\f3glArrayElement\fP is called.
67
Use \%\f3glDrawArrays\fP to construct a sequence of primitives (all of
68
the same type) from prespecified vertex and vertex attribute arrays.
69
Use \%\f3glArrayElement\fP to specify primitives
70
by indexing vertices and vertex attributes and \%\f3glDrawElements\fP to
71
construct a sequence of primitives by indexing vertices and vertex attributes.
73
\%\f3glIndexPointer\fP is available only if the GL version is 1.1 or greater.
75
The color index array is initially disabled, and it isn't accessed when
76
\%\f3glArrayElement\fP, \%\f3glDrawElements\fP, or \%\f3glDrawArrays\fP is called.
78
Execution of \%\f3glIndexPointer\fP is not allowed between
79
\%\f3glBegin\fP and the corresponding \%\f3glEnd\fP,
80
but an error may or may not be generated. If an error is not generated,
81
the operation is undefined.
83
\%\f3glIndexPointer\fP is typically implemented on the client side.
85
Since the color index array parameters are client-side state, they are
86
not saved or restored by \%\f3glPushAttrib\fP and \%\f3glPopAttrib\fP.
87
Use \%\f3glPushClientAttrib\fP and
88
\%\f3glPopClientAttrib\fP instead.
90
\%\f3GL_INVALID_ENUM\fP is generated if \f2type\fP is not an accepted value.
92
\%\f3GL_INVALID_VALUE\fP is generated if \f2stride\fP is negative.
94
\%\f3glIsEnabled\fP with argument \%\f3GL_INDEX_ARRAY\fP
96
\%\f3glGet\fP with argument \%\f3GL_INDEX_ARRAY_TYPE\fP
98
\%\f3glGet\fP with argument \%\f3GL_INDEX_ARRAY_STRIDE\fP
100
\%\f3glGetPointerv\fP with argument \%\f3GL_INDEX_ARRAY_POINTER\fP
102
\%\f3glArrayElement(3G)\fP,
103
\%\f3glColorPointer(3G)\fP,
104
\%\f3glDrawArrays(3G)\fP,
105
\%\f3glDrawElements(3G)\fP,
106
\%\f3glEdgeFlagPointer(3G)\fP,
107
\%\f3glEnable(3G)\fP,
108
\%\f3glGetPointerv(3G)\fP,
109
\%\f3glInterleavedArrays(3G)\fP,
110
\%\f3glNormalPointer(3G)\fP,
111
\%\f3glPopClientAttrib(3G)\fP,
112
\%\f3glPushClientAttrib(3G)\fP,
113
\%\f3glTexCoordPointer(3G)\fP,
114
\%\f3glVertexPointer(3G)\fP