71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
|
'\" te
|
||
|
'\"! tbl|eqn | mmdoc
|
||
|
'\"macro stdmacro
|
||
|
.ds Vn Version 1.2
|
||
|
.ds Dt 24 September 1999
|
||
|
.ds Re Release 1.2.1
|
||
|
.ds Dp Jan 14 18:30
|
||
|
.ds Dm 01 arrayelem
|
||
|
.ds Xs 50127 5 arrayelement.gl
|
||
|
.TH GLARRAYELEMENT 3G
|
||
|
.SH NAME
|
||
|
.B "glArrayElement
|
||
|
\- render a vertex using the specified vertex array element
|
||
|
|
||
|
.SH C SPECIFICATION
|
||
|
void \f3glArrayElement\fP(
|
||
|
GLint \fIi\fP )
|
||
|
.nf
|
||
|
.fi
|
||
|
|
||
|
.EQ
|
||
|
delim $$
|
||
|
.EN
|
||
|
.SH PARAMETERS
|
||
|
.TP \w'\f2i\fP\ \ 'u
|
||
|
\f2i\fP
|
||
|
Specifies an index into the enabled vertex data arrays.
|
||
|
.SH DESCRIPTION
|
||
|
\%\f3glArrayElement\fP commands are used within \%\f3glBegin\fP/\%\f3glEnd\fP pairs to
|
||
|
specify vertex and attribute data for point, line, and polygon
|
||
|
primitives. If \%\f3GL_VERTEX_ARRAY\fP is enabled when \%\f3glArrayElement\fP is called, a
|
||
|
single vertex is drawn, using
|
||
|
vertex and attribute data taken from location \f2i\fP of the enabled
|
||
|
arrays. If \%\f3GL_VERTEX_ARRAY\fP is not enabled, no drawing occurs but
|
||
|
the attributes corresponding to the enabled arrays are modified.
|
||
|
.P
|
||
|
Use \%\f3glArrayElement\fP to construct primitives by indexing vertex data, rather than
|
||
|
by streaming through arrays of data in first-to-last order. Because
|
||
|
each call specifies only a single vertex, it is possible to explicitly
|
||
|
specify per-primitive attributes such as a single normal per
|
||
|
individual triangle.
|
||
|
.P
|
||
|
Changes made to array data between the execution of \%\f3glBegin\fP and the
|
||
|
corresponding execution of \%\f3glEnd\fP may affect calls to \%\f3glArrayElement\fP that are made
|
||
|
within the same \%\f3glBegin\fP/\%\f3glEnd\fP period in non-sequential ways.
|
||
|
That is, a call to
|
||
|
.br
|
||
|
\%\f3glArrayElement\fP that precedes a change to array data may
|
||
|
access the changed data, and a call that follows a change to array data
|
||
|
may access original data.
|
||
|
.SH NOTES
|
||
|
\%\f3glArrayElement\fP is available only if the GL version is 1.1 or greater.
|
||
|
.P
|
||
|
\%\f3glArrayElement\fP is included in display lists. If \%\f3glArrayElement\fP is entered into a
|
||
|
display list, the necessary array data (determined by the array
|
||
|
pointers and enables) is also entered into the display list. Because
|
||
|
the array pointers and enables are client-side state, their values
|
||
|
affect display lists when the lists are created, not when the lists
|
||
|
are executed.
|
||
|
.SH SEE ALSO
|
||
|
\%\f3glClientActiveTextureARB(3G)\fP,
|
||
|
\%\f3glColorPointer(3G)\fP,
|
||
|
\%\f3glDrawArrays(3G)\fP,
|
||
|
\%\f3glEdgeFlagPointer(3G)\fP,
|
||
|
\%\f3glGetPointerv(3G)\fP,
|
||
|
\%\f3glIndexPointer(3G)\fP,
|
||
|
\%\f3glInterleavedArrays(3G)\fP,
|
||
|
\%\f3glNormalPointer(3G)\fP,
|
||
|
\%\f3glTexCoordPointer(3G)\fP,
|
||
|
\%\f3glVertexPointer(3G)\fP
|