Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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>glInterleavedArrays</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glInterleavedArrays"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glInterleavedArrays — simultaneously specify and enable several interleaved arrays</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">glInterleavedArrays</b>(</code></td><td>GLenum </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">stride</var>, </td></tr><tr><td> </td><td>const GLvoid * </td><td><var class="pdparam">pointer</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>format</code></em></span></dt><dd><p> | |
4 | Specifies the type of array to enable. Symbolic constants | |
5 | <code class="constant">GL_V2F</code>, | |
6 | <code class="constant">GL_V3F</code>, | |
7 | <code class="constant">GL_C4UB_V2F</code>, | |
8 | <code class="constant">GL_C4UB_V3F</code>, | |
9 | <code class="constant">GL_C3F_V3F</code>, | |
10 | <code class="constant">GL_N3F_V3F</code>, | |
11 | <code class="constant">GL_C4F_N3F_V3F</code>, | |
12 | <code class="constant">GL_T2F_V3F</code>, | |
13 | <code class="constant">GL_T4F_V4F</code>, | |
14 | <code class="constant">GL_T2F_C4UB_V3F</code>, | |
15 | <code class="constant">GL_T2F_C3F_V3F</code>, | |
16 | <code class="constant">GL_T2F_N3F_V3F</code>, | |
17 | <code class="constant">GL_T2F_C4F_N3F_V3F</code>, | |
18 | and | |
19 | <code class="constant">GL_T4F_C4F_N3F_V4F</code> | |
20 | are accepted. | |
21 | </p></dd><dt><span class="term"><em class="parameter"><code>stride</code></em></span></dt><dd><p> | |
22 | Specifies the offset in bytes between each aggregate array element. | |
23 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
24 | <code class="function">glInterleavedArrays</code> lets you specify and enable individual color, | |
25 | normal, | |
26 | texture and vertex | |
27 | arrays whose elements are part of a larger aggregate array element. | |
28 | For some implementations, this is more efficient than specifying the arrays | |
29 | separately. | |
30 | </p><p> | |
31 | If <em class="parameter"><code>stride</code></em> is 0, the aggregate elements are stored consecutively. | |
32 | Otherwise, <em class="parameter"><code>stride</code></em> bytes occur between the beginning of one | |
33 | aggregate array element and the beginning of the next aggregate array | |
34 | element. | |
35 | </p><p> | |
36 | <em class="parameter"><code>format</code></em> serves as a ``key'' | |
37 | describing the extraction of individual arrays from the aggregate array. | |
38 | If <em class="parameter"><code>format</code></em> contains a T, then texture coordinates are | |
39 | extracted from the interleaved array. If C is present, color values | |
40 | are extracted. If N is present, normal coordinates are extracted. | |
41 | Vertex coordinates are always extracted. | |
42 | </p><p> | |
43 | The digits 2, 3, and 4 denote how many values are extracted. | |
44 | F indicates that values are extracted as floating-point values. | |
45 | Colors may also be extracted as 4 unsigned bytes if 4UB follows the | |
46 | C. If a color is extracted as 4 unsigned bytes, the vertex | |
47 | array element which follows is located at the first possible | |
48 | floating-point aligned address. | |
49 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
50 | <code class="function">glInterleavedArrays</code> is available only if the GL version is 1.1 or greater. | |
51 | </p><p> | |
52 | If <code class="function">glInterleavedArrays</code> is called while compiling a display list, it is not | |
53 | compiled into the list, and it is executed immediately. | |
54 | </p><p> | |
55 | Execution of <code class="function">glInterleavedArrays</code> is not allowed between the execution of | |
56 | <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>, | |
57 | but an error may or may not be generated. If no error is generated, | |
58 | the operation is undefined. | |
59 | </p><p> | |
60 | <code class="function">glInterleavedArrays</code> is typically implemented on the client side. | |
61 | </p><p> | |
62 | Vertex array parameters are client-side state and are therefore not | |
63 | saved or restored by <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> and <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>. | |
64 | Use <a class="citerefentry" href="glPushClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushClientAttrib</span></span></a> and <a class="citerefentry" href="glPopClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a> instead. | |
65 | </p><p> | |
66 | For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, <code class="function">glInterleavedArrays</code> | |
67 | only updates the texture coordinate array for the client active texture | |
68 | unit. The texture coordinate state for other client texture units is not | |
69 | updated, regardless of whether the client texture unit is enabled or not. | |
70 | </p><p> | |
71 | Secondary color values are not supported in interleaved vertex array formats. | |
72 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
73 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted value. | |
74 | </p><p> | |
75 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>stride</code></em> is negative. | |
76 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
77 | <a class="citerefentry" href="glArrayElement.xml"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>, | |
78 | <a class="citerefentry" href="glClientActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>, | |
79 | <a class="citerefentry" href="glColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>, | |
80 | <a class="citerefentry" href="glDrawArrays.xml"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>, | |
81 | <a class="citerefentry" href="glDrawElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>, | |
82 | <a class="citerefentry" href="glEdgeFlagPointer.xml"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>, | |
83 | <a class="citerefentry" href="glEnableClientState.xml"><span class="citerefentry"><span class="refentrytitle">glEnableClientState</span></span></a>, | |
84 | <a class="citerefentry" href="glGetPointerv.xml"><span class="citerefentry"><span class="refentrytitle">glGetPointerv</span></span></a>, | |
85 | <a class="citerefentry" href="glIndexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>, | |
86 | <a class="citerefentry" href="glNormalPointer.xml"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>, | |
87 | <a class="citerefentry" href="glSecondaryColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glSecondaryColorPointer</span></span></a>, | |
88 | <a class="citerefentry" href="glTexCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>, | |
89 | <a class="citerefentry" href="glVertexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a> | |
90 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
91 | Copyright <span class="trademark"></span>© 1991-2006 | |
92 | Silicon Graphics, Inc. This document is licensed under the SGI | |
93 | Free Software B License. For details, see | |
94 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
95 | </p></div></div></body></html> |