5fee857b382bbbd96712503e1a8452f0a74efc25
[clinton/guile-figl.git] / upstream-man-pages / man4 / glVertexAttrib.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="glVertexAttrib">
5 <refmeta>
6 <refentrytitle>glVertexAttrib</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glVertexAttrib</refname>
11 <refpurpose>Specifies the value of a generic vertex attribute</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glVertexAttrib1f</function></funcdef>
17 <paramdef>GLuint <parameter>index</parameter></paramdef>
18 <paramdef>GLfloat <parameter>v0</parameter></paramdef>
19 </funcprototype>
20 <funcprototype>
21 <funcdef>void <function>glVertexAttrib1s</function></funcdef>
22 <paramdef>GLuint <parameter>index</parameter></paramdef>
23 <paramdef>GLshort <parameter>v0</parameter></paramdef>
24 </funcprototype>
25 <funcprototype>
26 <funcdef>void <function>glVertexAttrib1d</function></funcdef>
27 <paramdef>GLuint <parameter>index</parameter></paramdef>
28 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
29 </funcprototype>
30 <funcprototype>
31 <funcdef>void <function>glVertexAttribI1i</function></funcdef>
32 <paramdef>GLuint <parameter>index</parameter></paramdef>
33 <paramdef>GLint <parameter>v0</parameter></paramdef>
34 </funcprototype>
35 <funcprototype>
36 <funcdef>void <function>glVertexAttribI1ui</function></funcdef>
37 <paramdef>GLuint <parameter>index</parameter></paramdef>
38 <paramdef>GLuint <parameter>v0</parameter></paramdef>
39 </funcprototype>
40 <funcprototype>
41 <funcdef>void <function>glVertexAttrib2f</function></funcdef>
42 <paramdef>GLuint <parameter>index</parameter></paramdef>
43 <paramdef>GLfloat <parameter>v0</parameter></paramdef>
44 <paramdef>GLfloat <parameter>v1</parameter></paramdef>
45 </funcprototype>
46 <funcprototype>
47 <funcdef>void <function>glVertexAttrib2s</function></funcdef>
48 <paramdef>GLuint <parameter>index</parameter></paramdef>
49 <paramdef>GLshort <parameter>v0</parameter></paramdef>
50 <paramdef>GLshort <parameter>v1</parameter></paramdef>
51 </funcprototype>
52 <funcprototype>
53 <funcdef>void <function>glVertexAttrib2d</function></funcdef>
54 <paramdef>GLuint <parameter>index</parameter></paramdef>
55 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
56 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
57 </funcprototype>
58 <funcprototype>
59 <funcdef>void <function>glVertexAttribI2i</function></funcdef>
60 <paramdef>GLuint <parameter>index</parameter></paramdef>
61 <paramdef>GLint <parameter>v0</parameter></paramdef>
62 <paramdef>GLint <parameter>v1</parameter></paramdef>
63 </funcprototype>
64 <funcprototype>
65 <funcdef>void <function>glVertexAttribI2ui</function></funcdef>
66 <paramdef>GLuint <parameter>index</parameter></paramdef>
67 <paramdef>GLuint <parameter>v0</parameter></paramdef>
68 <paramdef>GLuint <parameter>v1</parameter></paramdef>
69 </funcprototype>
70 <funcprototype>
71 <funcdef>void <function>glVertexAttrib3f</function></funcdef>
72 <paramdef>GLuint <parameter>index</parameter></paramdef>
73 <paramdef>GLfloat <parameter>v0</parameter></paramdef>
74 <paramdef>GLfloat <parameter>v1</parameter></paramdef>
75 <paramdef>GLfloat <parameter>v2</parameter></paramdef>
76 </funcprototype>
77 <funcprototype>
78 <funcdef>void <function>glVertexAttrib3s</function></funcdef>
79 <paramdef>GLuint <parameter>index</parameter></paramdef>
80 <paramdef>GLshort <parameter>v0</parameter></paramdef>
81 <paramdef>GLshort <parameter>v1</parameter></paramdef>
82 <paramdef>GLshort <parameter>v2</parameter></paramdef>
83 </funcprototype>
84 <funcprototype>
85 <funcdef>void <function>glVertexAttrib3d</function></funcdef>
86 <paramdef>GLuint <parameter>index</parameter></paramdef>
87 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
88 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
89 <paramdef>GLdouble <parameter>v2</parameter></paramdef>
90 </funcprototype>
91 <funcprototype>
92 <funcdef>void <function>glVertexAttribI3i</function></funcdef>
93 <paramdef>GLuint <parameter>index</parameter></paramdef>
94 <paramdef>GLint <parameter>v0</parameter></paramdef>
95 <paramdef>GLint <parameter>v1</parameter></paramdef>
96 <paramdef>GLint <parameter>v2</parameter></paramdef>
97 </funcprototype>
98 <funcprototype>
99 <funcdef>void <function>glVertexAttribI3ui</function></funcdef>
100 <paramdef>GLuint <parameter>index</parameter></paramdef>
101 <paramdef>GLuint <parameter>v0</parameter></paramdef>
102 <paramdef>GLuint <parameter>v1</parameter></paramdef>
103 <paramdef>GLuint <parameter>v2</parameter></paramdef>
104 </funcprototype>
105 <funcprototype>
106 <funcdef>void <function>glVertexAttrib4f</function></funcdef>
107 <paramdef>GLuint <parameter>index</parameter></paramdef>
108 <paramdef>GLfloat <parameter>v0</parameter></paramdef>
109 <paramdef>GLfloat <parameter>v1</parameter></paramdef>
110 <paramdef>GLfloat <parameter>v2</parameter></paramdef>
111 <paramdef>GLfloat <parameter>v3</parameter></paramdef>
112 </funcprototype>
113 <funcprototype>
114 <funcdef>void <function>glVertexAttrib4s</function></funcdef>
115 <paramdef>GLuint <parameter>index</parameter></paramdef>
116 <paramdef>GLshort <parameter>v0</parameter></paramdef>
117 <paramdef>GLshort <parameter>v1</parameter></paramdef>
118 <paramdef>GLshort <parameter>v2</parameter></paramdef>
119 <paramdef>GLshort <parameter>v3</parameter></paramdef>
120 </funcprototype>
121 <funcprototype>
122 <funcdef>void <function>glVertexAttrib4d</function></funcdef>
123 <paramdef>GLuint <parameter>index</parameter></paramdef>
124 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
125 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
126 <paramdef>GLdouble <parameter>v2</parameter></paramdef>
127 <paramdef>GLdouble <parameter>v3</parameter></paramdef>
128 </funcprototype>
129 <funcprototype>
130 <funcdef>void <function>glVertexAttrib4Nub</function></funcdef>
131 <paramdef>GLuint <parameter>index</parameter></paramdef>
132 <paramdef>GLubyte <parameter>v0</parameter></paramdef>
133 <paramdef>GLubyte <parameter>v1</parameter></paramdef>
134 <paramdef>GLubyte <parameter>v2</parameter></paramdef>
135 <paramdef>GLubyte <parameter>v3</parameter></paramdef>
136 </funcprototype>
137 <funcprototype>
138 <funcdef>void <function>glVertexAttribI4i</function></funcdef>
139 <paramdef>GLuint <parameter>index</parameter></paramdef>
140 <paramdef>GLint <parameter>v0</parameter></paramdef>
141 <paramdef>GLint <parameter>v1</parameter></paramdef>
142 <paramdef>GLint <parameter>v2</parameter></paramdef>
143 <paramdef>GLint <parameter>v3</parameter></paramdef>
144 </funcprototype>
145 <funcprototype>
146 <funcdef>void <function>glVertexAttribI4ui</function></funcdef>
147 <paramdef>GLuint <parameter>index</parameter></paramdef>
148 <paramdef>GLuint <parameter>v0</parameter></paramdef>
149 <paramdef>GLuint <parameter>v1</parameter></paramdef>
150 <paramdef>GLuint <parameter>v2</parameter></paramdef>
151 <paramdef>GLuint <parameter>v3</parameter></paramdef>
152 </funcprototype>
153 <funcprototype>
154 <funcdef>void <function>glVertexAttribL1d</function></funcdef>
155 <paramdef>GLuint <parameter>index</parameter></paramdef>
156 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
157 </funcprototype>
158 <funcprototype>
159 <funcdef>void <function>glVertexAttribL2d</function></funcdef>
160 <paramdef>GLuint <parameter>index</parameter></paramdef>
161 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
162 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
163 </funcprototype>
164 <funcprototype>
165 <funcdef>void <function>glVertexAttribL3d</function></funcdef>
166 <paramdef>GLuint <parameter>index</parameter></paramdef>
167 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
168 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
169 <paramdef>GLdouble <parameter>v2</parameter></paramdef>
170 </funcprototype>
171 <funcprototype>
172 <funcdef>void <function>glVertexAttribL4d</function></funcdef>
173 <paramdef>GLuint <parameter>index</parameter></paramdef>
174 <paramdef>GLdouble <parameter>v0</parameter></paramdef>
175 <paramdef>GLdouble <parameter>v1</parameter></paramdef>
176 <paramdef>GLdouble <parameter>v2</parameter></paramdef>
177 <paramdef>GLdouble <parameter>v3</parameter></paramdef>
178 </funcprototype>
179 </funcsynopsis>
180 </refsynopsisdiv>
181 <refsect1 id="parameters"><title>Parameters</title>
182 <variablelist>
183 <varlistentry>
184 <term><parameter>index</parameter></term>
185 <listitem>
186 <para>Specifies the index of the generic vertex
187 attribute to be modified.</para>
188 </listitem>
189 </varlistentry>
190 <varlistentry>
191 <term>
192 <parameter>v0</parameter>,
193 <parameter>v1</parameter>,
194 <parameter>v2</parameter>,
195 <parameter>v3</parameter>
196 </term>
197 <listitem>
198 <para>Specifies the new values to be used for the
199 specified vertex attribute.</para>
200 </listitem>
201 </varlistentry>
202 </variablelist>
203 </refsect1>
204 <refsynopsisdiv><title>C Specification</title>
205 <funcsynopsis>
206 <funcprototype>
207 <funcdef>void <function>glVertexAttrib1fv</function></funcdef>
208 <paramdef>GLuint <parameter>index</parameter></paramdef>
209 <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
210 </funcprototype>
211 <funcprototype>
212 <funcdef>void <function>glVertexAttrib1sv</function></funcdef>
213 <paramdef>GLuint <parameter>index</parameter></paramdef>
214 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
215 </funcprototype>
216 <funcprototype>
217 <funcdef>void <function>glVertexAttrib1dv</function></funcdef>
218 <paramdef>GLuint <parameter>index</parameter></paramdef>
219 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
220 </funcprototype>
221 <funcprototype>
222 <funcdef>void <function>glVertexAttribI1iv</function></funcdef>
223 <paramdef>GLuint <parameter>index</parameter></paramdef>
224 <paramdef>const GLint *<parameter>v</parameter></paramdef>
225 </funcprototype>
226 <funcprototype>
227 <funcdef>void <function>glVertexAttribI1uiv</function></funcdef>
228 <paramdef>GLuint <parameter>index</parameter></paramdef>
229 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
230 </funcprototype>
231 <funcprototype>
232 <funcdef>void <function>glVertexAttrib2fv</function></funcdef>
233 <paramdef>GLuint <parameter>index</parameter></paramdef>
234 <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
235 </funcprototype>
236 <funcprototype>
237 <funcdef>void <function>glVertexAttrib2sv</function></funcdef>
238 <paramdef>GLuint <parameter>index</parameter></paramdef>
239 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
240 </funcprototype>
241 <funcprototype>
242 <funcdef>void <function>glVertexAttrib2dv</function></funcdef>
243 <paramdef>GLuint <parameter>index</parameter></paramdef>
244 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
245 </funcprototype>
246 <funcprototype>
247 <funcdef>void <function>glVertexAttribI2iv</function></funcdef>
248 <paramdef>GLuint <parameter>index</parameter></paramdef>
249 <paramdef>const GLint *<parameter>v</parameter></paramdef>
250 </funcprototype>
251 <funcprototype>
252 <funcdef>void <function>glVertexAttribI2uiv</function></funcdef>
253 <paramdef>GLuint <parameter>index</parameter></paramdef>
254 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
255 </funcprototype>
256 <funcprototype>
257 <funcdef>void <function>glVertexAttrib3fv</function></funcdef>
258 <paramdef>GLuint <parameter>index</parameter></paramdef>
259 <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
260 </funcprototype>
261 <funcprototype>
262 <funcdef>void <function>glVertexAttrib3sv</function></funcdef>
263 <paramdef>GLuint <parameter>index</parameter></paramdef>
264 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
265 </funcprototype>
266 <funcprototype>
267 <funcdef>void <function>glVertexAttrib3dv</function></funcdef>
268 <paramdef>GLuint <parameter>index</parameter></paramdef>
269 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
270 </funcprototype>
271 <funcprototype>
272 <funcdef>void <function>glVertexAttribI3iv</function></funcdef>
273 <paramdef>GLuint <parameter>index</parameter></paramdef>
274 <paramdef>const GLint *<parameter>v</parameter></paramdef>
275 </funcprototype>
276 <funcprototype>
277 <funcdef>void <function>glVertexAttribI3uiv</function></funcdef>
278 <paramdef>GLuint <parameter>index</parameter></paramdef>
279 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
280 </funcprototype>
281 <funcprototype>
282 <funcdef>void <function>glVertexAttrib4fv</function></funcdef>
283 <paramdef>GLuint <parameter>index</parameter></paramdef>
284 <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
285 </funcprototype>
286 <funcprototype>
287 <funcdef>void <function>glVertexAttrib4sv</function></funcdef>
288 <paramdef>GLuint <parameter>index</parameter></paramdef>
289 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
290 </funcprototype>
291 <funcprototype>
292 <funcdef>void <function>glVertexAttrib4dv</function></funcdef>
293 <paramdef>GLuint <parameter>index</parameter></paramdef>
294 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
295 </funcprototype>
296 <funcprototype>
297 <funcdef>void <function>glVertexAttrib4iv</function></funcdef>
298 <paramdef>GLuint <parameter>index</parameter></paramdef>
299 <paramdef>const GLint *<parameter>v</parameter></paramdef>
300 </funcprototype>
301 <funcprototype>
302 <funcdef>void <function>glVertexAttrib4bv</function></funcdef>
303 <paramdef>GLuint <parameter>index</parameter></paramdef>
304 <paramdef>const GLbyte *<parameter>v</parameter></paramdef>
305 </funcprototype>
306 <funcprototype>
307 <funcdef>void <function>glVertexAttrib4ubv</function></funcdef>
308 <paramdef>GLuint <parameter>index</parameter></paramdef>
309 <paramdef>const GLubyte *<parameter>v</parameter></paramdef>
310 </funcprototype>
311 <funcprototype>
312 <funcdef>void <function>glVertexAttrib4usv</function></funcdef>
313 <paramdef>GLuint <parameter>index</parameter></paramdef>
314 <paramdef>const GLushort *<parameter>v</parameter></paramdef>
315 </funcprototype>
316 <funcprototype>
317 <funcdef>void <function>glVertexAttrib4uiv</function></funcdef>
318 <paramdef>GLuint <parameter>index</parameter></paramdef>
319 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
320 </funcprototype>
321 <funcprototype>
322 <funcdef>void <function>glVertexAttrib4Nbv</function></funcdef>
323 <paramdef>GLuint <parameter>index</parameter></paramdef>
324 <paramdef>const GLbyte *<parameter>v</parameter></paramdef>
325 </funcprototype>
326 <funcprototype>
327 <funcdef>void <function>glVertexAttrib4Nsv</function></funcdef>
328 <paramdef>GLuint <parameter>index</parameter></paramdef>
329 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
330 </funcprototype>
331 <funcprototype>
332 <funcdef>void <function>glVertexAttrib4Niv</function></funcdef>
333 <paramdef>GLuint <parameter>index</parameter></paramdef>
334 <paramdef>const GLint *<parameter>v</parameter></paramdef>
335 </funcprototype>
336 <funcprototype>
337 <funcdef>void <function>glVertexAttrib4Nubv</function></funcdef>
338 <paramdef>GLuint <parameter>index</parameter></paramdef>
339 <paramdef>const GLubyte *<parameter>v</parameter></paramdef>
340 </funcprototype>
341 <funcprototype>
342 <funcdef>void <function>glVertexAttrib4Nusv</function></funcdef>
343 <paramdef>GLuint <parameter>index</parameter></paramdef>
344 <paramdef>const GLushort *<parameter>v</parameter></paramdef>
345 </funcprototype>
346 <funcprototype>
347 <funcdef>void <function>glVertexAttrib4Nuiv</function></funcdef>
348 <paramdef>GLuint <parameter>index</parameter></paramdef>
349 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
350 </funcprototype>
351 <funcprototype>
352 <funcdef>void <function>glVertexAttribI4bv</function></funcdef>
353 <paramdef>GLuint <parameter>index</parameter></paramdef>
354 <paramdef>const GLbyte *<parameter>v</parameter></paramdef>
355 </funcprototype>
356 <funcprototype>
357 <funcdef>void <function>glVertexAttribI4ubv</function></funcdef>
358 <paramdef>GLuint <parameter>index</parameter></paramdef>
359 <paramdef>const GLubyte *<parameter>v</parameter></paramdef>
360 </funcprototype>
361 <funcprototype>
362 <funcdef>void <function>glVertexAttribI4sv</function></funcdef>
363 <paramdef>GLuint <parameter>index</parameter></paramdef>
364 <paramdef>const GLshort *<parameter>v</parameter></paramdef>
365 </funcprototype>
366 <funcprototype>
367 <funcdef>void <function>glVertexAttribI4usv</function></funcdef>
368 <paramdef>GLuint <parameter>index</parameter></paramdef>
369 <paramdef>const GLushort *<parameter>v</parameter></paramdef>
370 </funcprototype>
371 <funcprototype>
372 <funcdef>void <function>glVertexAttribI4iv</function></funcdef>
373 <paramdef>GLuint <parameter>index</parameter></paramdef>
374 <paramdef>const GLint *<parameter>v</parameter></paramdef>
375 </funcprototype>
376 <funcprototype>
377 <funcdef>void <function>glVertexAttribI4uiv</function></funcdef>
378 <paramdef>GLuint <parameter>index</parameter></paramdef>
379 <paramdef>const GLuint *<parameter>v</parameter></paramdef>
380 </funcprototype>
381 <funcprototype>
382 <funcdef>void <function>glVertexAttribL1dv</function></funcdef>
383 <paramdef>GLuint <parameter>index</parameter></paramdef>
384 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
385 </funcprototype>
386 <funcprototype>
387 <funcdef>void <function>glVertexAttribL2dv</function></funcdef>
388 <paramdef>GLuint <parameter>index</parameter></paramdef>
389 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
390 </funcprototype>
391 <funcprototype>
392 <funcdef>void <function>glVertexAttribL3dv</function></funcdef>
393 <paramdef>GLuint <parameter>index</parameter></paramdef>
394 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
395 </funcprototype>
396 <funcprototype>
397 <funcdef>void <function>glVertexAttribL4dv</function></funcdef>
398 <paramdef>GLuint <parameter>index</parameter></paramdef>
399 <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
400 </funcprototype>
401 </funcsynopsis>
402 </refsynopsisdiv>
403 <refsect1 id="parameters2"><title>Parameters</title>
404 <variablelist>
405 <varlistentry>
406 <term><parameter>index</parameter></term>
407 <listitem>
408 <para>Specifies the index of the generic vertex
409 attribute to be modified.</para>
410 </listitem>
411 </varlistentry>
412 <varlistentry>
413 <term><parameter>v</parameter></term>
414 <listitem>
415 <para>Specifies a pointer to an array of values to
416 be used for the generic vertex attribute.</para>
417 </listitem>
418 </varlistentry>
419 </variablelist>
420 </refsect1>
421 <refsynopsisdiv><title>C Specification</title>
422 <funcsynopsis>
423 <funcprototype>
424 <funcdef>void <function>glVertexAttribP1ui</function></funcdef>
425 <paramdef>GLuint <parameter>index</parameter></paramdef>
426 <paramdef>GLenum <parameter>type</parameter></paramdef>
427 <paramdef>GLboolean <parameter>normalized</parameter></paramdef>
428 <paramdef>GLuint <parameter>value</parameter></paramdef>
429 </funcprototype>
430 <funcprototype>
431 <funcdef>void <function>glVertexAttribP2ui</function></funcdef>
432 <paramdef>GLuint <parameter>index</parameter></paramdef>
433 <paramdef>GLenum <parameter>type</parameter></paramdef>
434 <paramdef>GLboolean <parameter>normalized</parameter></paramdef>
435 <paramdef>GLuint <parameter>value</parameter></paramdef>
436 </funcprototype>
437 <funcprototype>
438 <funcdef>void <function>glVertexAttribP3ui</function></funcdef>
439 <paramdef>GLuint <parameter>index</parameter></paramdef>
440 <paramdef>GLenum <parameter>type</parameter></paramdef>
441 <paramdef>GLboolean <parameter>normalized</parameter></paramdef>
442 <paramdef>GLuint <parameter>value</parameter></paramdef>
443 </funcprototype>
444 <funcprototype>
445 <funcdef>void <function>glVertexAttribP4ui</function></funcdef>
446 <paramdef>GLuint <parameter>index</parameter></paramdef>
447 <paramdef>GLenum <parameter>type</parameter></paramdef>
448 <paramdef>GLboolean <parameter>normalized</parameter></paramdef>
449 <paramdef>GLuint <parameter>value</parameter></paramdef>
450 </funcprototype>
451 </funcsynopsis>
452 </refsynopsisdiv>
453 <refsect1 id="parameters3"><title>Parameters</title>
454 <variablelist>
455 <varlistentry>
456 <term><parameter>index</parameter></term>
457 <listitem>
458 <para>Specifies the index of the generic vertex
459 attribute to be modified.</para>
460 </listitem>
461 </varlistentry>
462 <varlistentry>
463 <term><parameter>type</parameter></term>
464 <listitem>
465 <para>Type of packing used on the data. This parameter must be
466 <constant>GL_INT_10_10_10_2</constant> or <constant>GL_UNSIGNED_INT_10_10_10_2</constant>
467 to specify signed or unsigned data, respectively.</para>
468 </listitem>
469 </varlistentry>
470 <varlistentry>
471 <term><parameter>normalized</parameter></term>
472 <listitem>
473 <para>If <constant>GL_TRUE</constant>, then the values are to be
474 converted to floating point values by normalizing. Otherwise,
475 they are converted directly to floating point values.</para>
476 </listitem>
477 </varlistentry>
478 <varlistentry>
479 <term>
480 <parameter>value</parameter>
481 </term>
482 <listitem>
483 <para>Specifies the new packed value to be used for the
484 specified vertex attribute.</para>
485 </listitem>
486 </varlistentry>
487 </variablelist>
488 </refsect1>
489 <refsect1 id="description"><title>Description</title>
490 <para>The <function>glVertexAttrib</function> family of entry points
491 allows an application to pass generic vertex attributes in
492 numbered locations.</para>
493
494 <para>Generic attributes are defined as four-component values
495 that are organized into an array. The first entry of this array
496 is numbered 0, and the size of the array is specified by the
497 implementation-dependent constant
498 <constant>GL_MAX_VERTEX_ATTRIBS</constant>. Individual elements
499 of this array can be modified with a
500 <function>glVertexAttrib</function> call that specifies the
501 index of the element to be modified and a value for that
502 element.</para>
503
504 <para>These commands can be used to specify one, two, three, or
505 all four components of the generic vertex attribute specified by
506 <parameter>index</parameter>. A <function>1</function> in the
507 name of the command indicates that only one value is passed, and
508 it will be used to modify the first component of the generic
509 vertex attribute. The second and third components will be set to
510 0, and the fourth component will be set to 1. Similarly, a
511 <function>2</function> in the name of the command indicates that
512 values are provided for the first two components, the third
513 component will be set to 0, and the fourth component will be set
514 to 1. A <function>3</function> in the name of the command
515 indicates that values are provided for the first three
516 components and the fourth component will be set to 1, whereas a
517 <function>4</function> in the name indicates that values are
518 provided for all four components.</para>
519
520 <para>The letters <function>s</function>,
521 <function>f</function>, <function>i</function>,
522 <function>d</function>, <function>ub</function>,
523 <function>us</function>, and <function>ui</function> indicate
524 whether the arguments are of type short, float, int, double,
525 unsigned byte, unsigned short, or unsigned int. When
526 <function>v</function> is appended to the name, the commands can
527 take a pointer to an array of such values.</para>
528
529 <para>Additional capitalized letters can indicate further alterations
530 to the default behavior of the glVertexAttrib function:</para>
531
532 <para>
533 The commands containing <function>N</function> indicate that
534 the arguments will be passed as fixed-point values that are
535 scaled to a normalized range according to the component
536 conversion rules defined by the OpenGL specification. Signed
537 values are understood to represent fixed-point values in the
538 range [-1,1], and unsigned values are understood to represent
539 fixed-point values in the range [0,1].
540 </para>
541
542 <para>
543 The commands containing <function>I</function> indicate that
544 the arguments are extended to full signed or unsigned integers.
545 </para>
546
547 <para>
548 The commands containing <function>P</function> indicate that
549 the arguments are stored as packed components within a larger
550 natural type.
551 </para>
552
553 <para>
554 The commands containing <function>L</function> indicate that
555 the arguments are full 64-bit quantities and should be passed directly
556 to shader inputs declared as 64-bit double precision types.
557 </para>
558
559 <para>OpenGL Shading Language attribute variables are allowed to
560 be of type mat2, mat3, or mat4. Attributes of these types may be
561 loaded using the <function>glVertexAttrib</function> entry
562 points. Matrices must be loaded into successive generic
563 attribute slots in column major order, with one column of the
564 matrix in each generic attribute slot.</para>
565
566 <para>A user-defined attribute variable declared in a vertex
567 shader can be bound to a generic attribute index by calling
568 <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>.
569 This allows an application to use more descriptive variable
570 names in a vertex shader. A subsequent change to the specified
571 generic vertex attribute will be immediately reflected as a
572 change to the corresponding attribute variable in the vertex
573 shader.</para>
574
575 <para>The binding between a generic vertex attribute index and a
576 user-defined attribute variable in a vertex shader is part of
577 the state of a program object, but the current value of the
578 generic vertex attribute is not. The value of each generic
579 vertex attribute is part of current state, just like standard
580 vertex attributes, and it is maintained even if a different
581 program object is used.</para>
582
583 <para>An application may freely modify generic vertex attributes
584 that are not bound to a named vertex shader attribute variable.
585 These values are simply maintained as part of current state and
586 will not be accessed by the vertex shader. If a generic vertex
587 attribute bound to an attribute variable in a vertex shader is
588 not updated while the vertex shader is executing, the vertex
589 shader will repeatedly use the current value for the generic
590 vertex attribute.</para>
591 </refsect1>
592 <refsect1 id="notes"><title>Notes</title>
593 <para>Generic vertex attributes can be updated at any time.</para>
594
595 <para>It is possible for an application to bind more than one
596 attribute name to the same generic vertex attribute index. This
597 is referred to as aliasing, and it is allowed only if just one
598 of the aliased attribute variables is active in the vertex
599 shader, or if no path through the vertex shader consumes more
600 than one of the attributes aliased to the same location. OpenGL
601 implementations are not required to do error checking to detect
602 aliasing, they are allowed to assume that aliasing will not
603 occur, and they are allowed to employ optimizations that work
604 only in the absence of aliasing.</para>
605
606 <para>There is no provision for binding standard vertex
607 attributes; therefore, it is not possible to alias generic
608 attributes with standard attributes.</para>
609
610 <para>
611 <function>glVertexAttribL</function> versions are available only if the GL version is 4.1 or higher.
612 </para>
613 </refsect1>
614 <refsect1 id="errors"><title>Errors</title>
615 <para><constant>GL_INVALID_VALUE</constant> is generated if
616 <parameter>index</parameter> is greater than or equal to
617 <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
618
619 <para><constant>GL_INVALID_ENUM</constant> is generated if
620 <function>glVertexAttribP</function> is used with a
621 <parameter>type</parameter> other than
622 <constant>GL_INT_10_10_10_2</constant> or
623 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>.</para>
624
625 <para><constant>GL_INVALID_ENUM</constant> is generated if
626 <function>glVertexAttribL</function> is used with a
627 <parameter>type</parameter> other than
628 <constant>GL_DOUBLE</constant>.</para>
629
630 </refsect1>
631 <refsect1 id="associatedgets"><title>Associated Gets</title>
632 <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
633 with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
634
635 <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
636 with argument <parameter>program</parameter> and the index of an active
637 attribute variable</para>
638
639 <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
640 with argument <parameter>program</parameter> and an attribute
641 variable name</para>
642
643 <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
644 with arguments <constant>GL_CURRENT_VERTEX_ATTRIB</constant> and
645 <parameter>index</parameter></para>
646 </refsect1>
647 <refsect1 id="seealso"><title>See Also</title>
648 <para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
649 <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
650 </refsect1>
651 <refsect1 id="Copyright"><title>Copyright</title>
652 <para>
653 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
654 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
655 This material may be distributed subject to the terms and conditions set forth in
656 the Open Publication License, v 1.0, 8 June 1999.
657 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
658 </para>
659 </refsect1>
660 </refentry>