Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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="glInterleavedArrays"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glInterleavedArrays</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glInterleavedArrays</refname> | |
17 | <refpurpose>simultaneously specify and enable several interleaved arrays</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glInterleavedArrays</function></funcdef> | |
23 | <paramdef>GLenum <parameter>format</parameter></paramdef> | |
24 | <paramdef>GLsizei <parameter>stride</parameter></paramdef> | |
25 | <paramdef>const GLvoid * <parameter>pointer</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>format</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specifies the type of array to enable. Symbolic constants | |
36 | <constant>GL_V2F</constant>, | |
37 | <constant>GL_V3F</constant>, | |
38 | <constant>GL_C4UB_V2F</constant>, | |
39 | <constant>GL_C4UB_V3F</constant>, | |
40 | <constant>GL_C3F_V3F</constant>, | |
41 | <constant>GL_N3F_V3F</constant>, | |
42 | <constant>GL_C4F_N3F_V3F</constant>, | |
43 | <constant>GL_T2F_V3F</constant>, | |
44 | <constant>GL_T4F_V4F</constant>, | |
45 | <constant>GL_T2F_C4UB_V3F</constant>, | |
46 | <constant>GL_T2F_C3F_V3F</constant>, | |
47 | <constant>GL_T2F_N3F_V3F</constant>, | |
48 | <constant>GL_T2F_C4F_N3F_V3F</constant>, | |
49 | and | |
50 | <constant>GL_T4F_C4F_N3F_V4F</constant> | |
51 | are accepted. | |
52 | </para> | |
53 | </listitem> | |
54 | </varlistentry> | |
55 | <varlistentry> | |
56 | <term><parameter>stride</parameter></term> | |
57 | <listitem> | |
58 | <para> | |
59 | Specifies the offset in bytes between each aggregate array element. | |
60 | </para> | |
61 | </listitem> | |
62 | </varlistentry> | |
63 | </variablelist> | |
64 | </refsect1> | |
65 | <refsect1 id="description"><title>Description</title> | |
66 | <para> | |
67 | <function>glInterleavedArrays</function> lets you specify and enable individual color, | |
68 | normal, | |
69 | texture and vertex | |
70 | arrays whose elements are part of a larger aggregate array element. | |
71 | For some implementations, this is more efficient than specifying the arrays | |
72 | separately. | |
73 | </para> | |
74 | <para> | |
75 | If <parameter>stride</parameter> is 0, the aggregate elements are stored consecutively. | |
76 | Otherwise, <parameter>stride</parameter> bytes occur between the beginning of one | |
77 | aggregate array element and the beginning of the next aggregate array | |
78 | element. | |
79 | </para> | |
80 | <para> | |
81 | <parameter>format</parameter> serves as a ``key'' | |
82 | describing the extraction of individual arrays from the aggregate array. | |
83 | If <parameter>format</parameter> contains a T, then texture coordinates are | |
84 | extracted from the interleaved array. If C is present, color values | |
85 | are extracted. If N is present, normal coordinates are extracted. | |
86 | Vertex coordinates are always extracted. | |
87 | </para> | |
88 | <para> | |
89 | The digits 2, 3, and 4 denote how many values are extracted. | |
90 | F indicates that values are extracted as floating-point values. | |
91 | Colors may also be extracted as 4 unsigned bytes if 4UB follows the | |
92 | C. If a color is extracted as 4 unsigned bytes, the vertex | |
93 | array element which follows is located at the first possible | |
94 | floating-point aligned address. | |
95 | </para> | |
96 | </refsect1> | |
97 | <refsect1 id="notes"><title>Notes</title> | |
98 | <para> | |
99 | <function>glInterleavedArrays</function> is available only if the GL version is 1.1 or greater. | |
100 | </para> | |
101 | <para> | |
102 | If <function>glInterleavedArrays</function> is called while compiling a display list, it is not | |
103 | compiled into the list, and it is executed immediately. | |
104 | </para> | |
105 | <para> | |
106 | Execution of <function>glInterleavedArrays</function> is not allowed between the execution of | |
107 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>, | |
108 | but an error may or may not be generated. If no error is generated, | |
109 | the operation is undefined. | |
110 | </para> | |
111 | <para> | |
112 | <function>glInterleavedArrays</function> is typically implemented on the client side. | |
113 | </para> | |
114 | <para> | |
115 | Vertex array parameters are client-side state and are therefore not | |
116 | saved or restored by <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopAttrib</refentrytitle></citerefentry>. | |
117 | Use <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry> instead. | |
118 | </para> | |
119 | <para> | |
120 | For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glInterleavedArrays</function> | |
121 | only updates the texture coordinate array for the client active texture | |
122 | unit. The texture coordinate state for other client texture units is not | |
123 | updated, regardless of whether the client texture unit is enabled or not. | |
124 | </para> | |
125 | <para> | |
126 | Secondary color values are not supported in interleaved vertex array formats. | |
127 | </para> | |
128 | </refsect1> | |
129 | <refsect1 id="errors"><title>Errors</title> | |
130 | <para> | |
131 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted value. | |
132 | </para> | |
133 | <para> | |
134 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>stride</parameter> is negative. | |
135 | </para> | |
136 | </refsect1> | |
137 | <refsect1 id="seealso"><title>See Also</title> | |
138 | <para> | |
139 | <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, | |
140 | <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>, | |
141 | <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>, | |
142 | <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, | |
143 | <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, | |
144 | <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>, | |
145 | <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>, | |
146 | <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>, | |
147 | <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>, | |
148 | <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>, | |
149 | <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>, | |
150 | <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>, | |
151 | <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry> | |
152 | </para> | |
153 | </refsect1> | |
154 | <refsect1 id="Copyright"><title>Copyright</title> | |
155 | <para> | |
156 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
157 | Silicon Graphics, Inc. This document is licensed under the SGI | |
158 | Free Software B License. For details, see | |
159 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
160 | </para> | |
161 | </refsect1> | |
162 | </refentry> |