1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glArrayElement">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glArrayElement
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glArrayElement
</refname>
17 <refpurpose>render a vertex using the specified vertex array element
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glArrayElement
</function></funcdef>
23 <paramdef>GLint
<parameter>i
</parameter></paramdef>
27 <!-- eqn: ignoring delim $$ -->
28 <refsect1 id=
"parameters"><title>Parameters
</title>
31 <term><parameter>i
</parameter></term>
34 Specifies an index into the enabled vertex data arrays.
40 <refsect1 id=
"description"><title>Description
</title>
42 <function>glArrayElement
</function> commands are used within
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry> pairs to
43 specify vertex and attribute data for point, line, and polygon
44 primitives. If
<constant>GL_VERTEX_ARRAY
</constant> is enabled when
<function>glArrayElement
</function> is called, a
45 single vertex is drawn, using
46 vertex and attribute data taken from location
<parameter>i
</parameter> of the enabled
47 arrays. If
<constant>GL_VERTEX_ARRAY
</constant> is not enabled, no drawing occurs but
48 the attributes corresponding to the enabled arrays are modified.
51 Use
<function>glArrayElement
</function> to construct primitives by indexing vertex data, rather than
52 by streaming through arrays of data in first-to-last order. Because
53 each call specifies only a single vertex, it is possible to explicitly
54 specify per-primitive attributes such as a single normal for each
58 Changes made to array data between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry> and the
59 corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry> may affect calls to
<function>glArrayElement
</function> that are made
60 within the same
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry> period in nonsequential ways.
62 <function>glArrayElement
</function> that precedes a change to array data may
63 access the changed data, and a call that follows a change to array data
64 may access original data.
67 <refsect1 id=
"notes"><title>Notes
</title>
69 <function>glArrayElement
</function> is available only if the GL version is
1.1 or greater.
72 <function>glArrayElement
</function> is included in display lists. If
<function>glArrayElement
</function> is entered into a
73 display list, the necessary array data (determined by the array
74 pointers and enables) is also entered into the display list. Because
75 the array pointers and enables are client-side state, their values
76 affect display lists when the lists are created, not when the lists
80 <refsect1 id=
"errors"><title>Errors
</title>
82 <constant>GL_INVALID_VALUE
</constant> may be generated if
<parameter>i
</parameter> is negative.
85 <constant>GL_INVALID_OPERATION
</constant> is generated if a non-zero buffer object name is bound to an
86 enabled array and the buffer object's data store is currently mapped.
89 <refsect1 id=
"seealso"><title>See Also
</title>
91 <citerefentry><refentrytitle>glClientActiveTexture
</refentrytitle></citerefentry>,
92 <citerefentry><refentrytitle>glColorPointer
</refentrytitle></citerefentry>,
93 <citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
94 <citerefentry><refentrytitle>glEdgeFlagPointer
</refentrytitle></citerefentry>,
95 <citerefentry><refentrytitle>glFogCoordPointer
</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>glGetPointerv
</refentrytitle></citerefentry>,
97 <citerefentry><refentrytitle>glIndexPointer
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>glInterleavedArrays
</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>glNormalPointer
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glSecondaryColorPointer
</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>glTexCoordPointer
</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>glVertexPointer
</refentrytitle></citerefentry>
105 <refsect1 id=
"Copyright"><title>Copyright
</title>
107 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
108 Silicon Graphics, Inc. This document is licensed under the SGI
109 Free Software B License. For details, see
110 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.