include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glTexCoordPointer.xml
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="glTexCoordPointer">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glTexCoordPointer</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glTexCoordPointer</refname>
17 <refpurpose>define an array of texture coordinates</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glTexCoordPointer</function></funcdef>
23 <paramdef>GLint <parameter>size</parameter></paramdef>
24 <paramdef>GLenum <parameter>type</parameter></paramdef>
25 <paramdef>GLsizei <parameter>stride</parameter></paramdef>
26 <paramdef>const GLvoid * <parameter>pointer</parameter></paramdef>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <!-- eqn: ignoring delim $$ -->
31 <refsect1 id="parameters"><title>Parameters</title>
32 <variablelist>
33 <varlistentry>
34 <term><parameter>size</parameter></term>
35 <listitem>
36 <para>
37 Specifies the number of coordinates per array element. Must be 1, 2, 3,
38 or 4. The initial value is 4.
39 </para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>type</parameter></term>
44 <listitem>
45 <para>
46 Specifies the data type of each texture coordinate.
47 Symbolic constants
48 <constant>GL_SHORT</constant>,
49 <constant>GL_INT</constant>,
50 <constant>GL_FLOAT</constant>,
51 or <constant>GL_DOUBLE</constant>
52 are accepted. The initial value is <constant>GL_FLOAT</constant>.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>stride</parameter></term>
58 <listitem>
59 <para>
60 Specifies the byte offset between consecutive texture coordinate sets.
61 If <parameter>stride</parameter> is 0, the array elements are understood
62 to be tightly packed. The initial value is 0.
63 </para>
64 </listitem>
65 </varlistentry>
66 <varlistentry>
67 <term><parameter>pointer</parameter></term>
68 <listitem>
69 <para>
70 Specifies a pointer to the first coordinate of the first texture coordinate set in the
71 array. The initial value is 0.
72 </para>
73 </listitem>
74 </varlistentry>
75 </variablelist>
76 </refsect1>
77 <refsect1 id="description"><title>Description</title>
78 <para>
79 <function>glTexCoordPointer</function> specifies the location and data format of an array of texture
80 coordinates to use when rendering.
81 <parameter>size</parameter> specifies the number of coordinates per
82 texture coordinate set, and must be 1, 2, 3, or 4.
83 <parameter>type</parameter> specifies the data type of each texture coordinate,
84 and <parameter>stride</parameter> specifies the byte stride from one
85 texture coordinate set to the next, allowing vertices and attributes
86 to be packed into a single array or stored in separate arrays.
87 (Single-array storage may be more efficient on some implementations;
88 see
89 <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>.)
90 </para>
91 <para>
92 If a non-zero named buffer object is bound to the <constant>GL_ARRAY_BUFFER</constant> target
93 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture coordinate array is
94 specified, <parameter>pointer</parameter> is treated as a byte offset into the buffer object's data store.
95 Also, the buffer object binding (<constant>GL_ARRAY_BUFFER_BINDING</constant>) is saved as texture coordinate vertex array
96 client-side state (<constant>GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING</constant>).
97 </para>
98 <para>
99 When a texture coordinate array is specified,
100 <parameter>size</parameter>, <parameter>type</parameter>, <parameter>stride</parameter>, and <parameter>pointer</parameter> are saved as client-side
101 state, in addition to the current vertex array buffer object binding.
102 </para>
103 <para>
104 To enable and disable a texture coordinate array, call <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry> and
105 <citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry> with the argument
106 <constant>GL_TEXTURE_COORD_ARRAY</constant>. If enabled, the texture coordinate array is used when
107 <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>,
108 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>
109 is called.
110 </para>
111 </refsect1>
112 <refsect1 id="notes"><title>Notes</title>
113 <para>
114 <function>glTexCoordPointer</function> is available only if the GL version is 1.1 or greater.
115 </para>
116 <para>
117 For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code>
118 extension is supported, <function>glTexCoordPointer</function> updates the
119 texture coordinate array state of the active client texture unit,
120 specified with <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>.
121 </para>
122 <para>
123 Each texture coordinate array is initially disabled and isn't accessed when
124 <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
125 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>
126 is called.
127 </para>
128 <para>
129 Execution of <function>glTexCoordPointer</function> is not allowed between the execution of
130 <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>,
131 but an error may or may not be generated. If no error is generated,
132 the operation is undefined.
133 </para>
134 <para>
135 <function>glTexCoordPointer</function> is typically implemented on the client side.
136 </para>
137 <para>
138 Texture coordinate array parameters are client-side state and are therefore
139 not saved or restored by <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopAttrib</refentrytitle></citerefentry>.
140 Use <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry> and
141 <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry> instead.
142 </para>
143 </refsect1>
144 <refsect1 id="errors"><title>Errors</title>
145 <para>
146 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is not 1, 2, 3, or 4.
147 </para>
148 <para>
149 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not an accepted value.
150 </para>
151 <para>
152 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>stride</parameter> is negative.
153 </para>
154 </refsect1>
155 <refsect1 id="associatedgets"><title>Associated Gets</title>
156 <para>
157 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY</constant>
158 </para>
159 <para>
160 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY_SIZE</constant>
161 </para>
162 <para>
163 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY_TYPE</constant>
164 </para>
165 <para>
166 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY_STRIDE</constant>
167 </para>
168 <para>
169 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING</constant>
170 </para>
171 <para>
172 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ARRAY_BUFFER_BINDING</constant>
173 </para>
174 <para>
175 <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COORD_ARRAY_POINTER</constant>
176 </para>
177 </refsect1>
178 <refsect1 id="seealso"><title>See Also</title>
179 <para>
180 <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
181 <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
182 <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>,
183 <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
184 <citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry>,
185 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
186 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
187 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
188 <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
189 <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>,
190 <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
191 <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
192 <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
193 <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>,
194 <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,
195 <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>,
196 <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
197 <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry>,
198 <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>,
199 <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
200 <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>,
201 <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
202 <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
203 </para>
204 </refsect1>
205 <refsect1 id="Copyright"><title>Copyright</title>
206 <para>
207 Copyright <trademark class="copyright"></trademark> 1991-2006
208 Silicon Graphics, Inc. This document is licensed under the SGI
209 Free Software B License. For details, see
210 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
211 </para>
212 </refsect1>
213 </refentry>