include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glArrayElement.xml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glArrayElement</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glArrayElement"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glArrayElement — render a vertex using the specified vertex array element</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glArrayElement</b>(</code></td><td>GLint  </td><td><var class="pdparam">i</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>i</code></em></span></dt><dd><p>
4 Specifies an index into the enabled vertex data arrays.
5 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
6 <code class="function">glArrayElement</code> commands are used within <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>/<a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a> pairs to
7 specify vertex and attribute data for point, line, and polygon
8 primitives. If <code class="constant">GL_VERTEX_ARRAY</code> is enabled when <code class="function">glArrayElement</code> is called, a
9 single vertex is drawn, using
10 vertex and attribute data taken from location <em class="parameter"><code>i</code></em> of the enabled
11 arrays. If <code class="constant">GL_VERTEX_ARRAY</code> is not enabled, no drawing occurs but
12 the attributes corresponding to the enabled arrays are modified.
13 </p><p>
14 Use <code class="function">glArrayElement</code> to construct primitives by indexing vertex data, rather than
15 by streaming through arrays of data in first-to-last order. Because
16 each call specifies only a single vertex, it is possible to explicitly
17 specify per-primitive attributes such as a single normal for each
18 triangle.
19 </p><p>
20 Changes made to array data between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the
21 corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a> may affect calls to <code class="function">glArrayElement</code> that are made
22 within the same <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>/<a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a> period in nonsequential ways.
23 That is, a call to
24 <code class="function">glArrayElement</code> that precedes a change to array data may
25 access the changed data, and a call that follows a change to array data
26 may access original data.
27 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
28 <code class="function">glArrayElement</code> is available only if the GL version is 1.1 or greater.
29 </p><p>
30 <code class="function">glArrayElement</code> is included in display lists. If <code class="function">glArrayElement</code> is entered into a
31 display list, the necessary array data (determined by the array
32 pointers and enables) is also entered into the display list. Because
33 the array pointers and enables are client-side state, their values
34 affect display lists when the lists are created, not when the lists
35 are executed.
36 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
37 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>i</code></em> is negative.
38 </p><p>
39 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to an
40 enabled array and the buffer object's data store is currently mapped.
41 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
42 <a class="citerefentry" href="glClientActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>,
43 <a class="citerefentry" href="glColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>,
44 <a class="citerefentry" href="glDrawArrays.xml"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
45 <a class="citerefentry" href="glEdgeFlagPointer.xml"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>,
46 <a class="citerefentry" href="glFogCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glFogCoordPointer</span></span></a>,
47 <a class="citerefentry" href="glGetPointerv.xml"><span class="citerefentry"><span class="refentrytitle">glGetPointerv</span></span></a>,
48 <a class="citerefentry" href="glIndexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>,
49 <a class="citerefentry" href="glInterleavedArrays.xml"><span class="citerefentry"><span class="refentrytitle">glInterleavedArrays</span></span></a>,
50 <a class="citerefentry" href="glNormalPointer.xml"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>,
51 <a class="citerefentry" href="glSecondaryColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glSecondaryColorPointer</span></span></a>,
52 <a class="citerefentry" href="glTexCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>,
53 <a class="citerefentry" href="glVertexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a>
54 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
55 Copyright <span class="trademark"></span>© 1991-2006
56 Silicon Graphics, Inc. This document is licensed under the SGI
57 Free Software B License. For details, see
58 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
59 </p></div></div></body></html>