include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / xhtml / glVertexAttrib.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?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" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glVertexAttrib</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glVertexAttrib"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glVertexAttrib — Specifies the value of a generic vertex attribute</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1f</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v0</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1s</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v0</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1d</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v0</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI1i</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v0</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI1ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v0</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2f</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v1</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2s</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v1</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2d</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v1</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI2i</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v1</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI2ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v1</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3f</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v2</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3s</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v2</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3d</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v2</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI3i</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v2</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI3ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLoint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLoint  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLoint  </td><td><var class="pdparam">v2</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4f</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">v3</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4s</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">v3</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4d</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">v3</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nub</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLubyte  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLubyte  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLubyte  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLubyte  </td><td><var class="pdparam">v3</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4i</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">v3</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v0</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v1</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v2</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">v3</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>index</code></em></span></dt><dd><p>Specifies the index of the generic vertex
5 attribute to be modified.</p></dd><dt><span class="term">
6 <em class="parameter"><code>v0</code></em>,
7 <em class="parameter"><code>v1</code></em>,
8 <em class="parameter"><code>v2</code></em>,
9 <em class="parameter"><code>v3</code></em>
10 </span></dt><dd><p>Specifies the new values to be used for the
11 specified vertex attribute.</p></dd></dl></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1fv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLfloat * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1sv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib1dv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLdouble * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI1iv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI1uiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2fv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLfloat * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2sv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib2dv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLdouble * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI2iv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI2uiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3fv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLfloat * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3sv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib3dv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLdouble * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI3iv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI3uiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4fv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLfloat * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4sv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4dv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLdouble * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4iv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4bv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLbyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4ubv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLubyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4usv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLushort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4uiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nbv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLbyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nsv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Niv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nubv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLubyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nusv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLushort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttrib4Nuiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4bv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLbyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4ubv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLubyte * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4sv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLshort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4usv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLushort * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4iv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribI4uiv</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>const GLuint * </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters2"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>index</code></em></span></dt><dd><p>Specifies the index of the generic vertex
12 attribute to be modified.</p></dd><dt><span class="term"><em class="parameter"><code>v</code></em></span></dt><dd><p>Specifies a pointer to an array of values to
13 be used for the generic vertex attribute.</p></dd></dl></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribP1ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">normalized</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">value</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribP2ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">normalized</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">value</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribP3ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">normalized</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">value</var><code>)</code>;</td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribP4ui</b>(</code></td><td>GLuint  </td><td><var class="pdparam">index</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">normalized</var>, </td></tr><tr><td> </td><td>GLuint  </td><td><var class="pdparam">value</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters3"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>index</code></em></span></dt><dd><p>Specifies the index of the generic vertex
14 attribute to be modified.</p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>Type of packing used on the data. This parameter must be
15 <code class="constant">GL_INT_10_10_10_2</code> or <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>
16 to specify signed or unsigned data, respectively.</p></dd><dt><span class="term"><em class="parameter"><code>normalized</code></em></span></dt><dd><p>If <code class="constant">GL_TRUE</code>, then the values are to be
17 converted to floating point values by normalizing. Otherwise,
18 they are converted directly to floating point values.</p></dd><dt><span class="term">
19 <em class="parameter"><code>value</code></em>
20 </span></dt><dd><p>Specifies the new packed value to be used for the
21 specified vertex attribute.</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>OpenGL defines a number of standard vertex attributes that
22 applications can modify with standard API entry points (color,
23 normal, texture coordinates, etc.). The
24 <code class="function">glVertexAttrib</code> family of entry points
25 allows an application to pass generic vertex attributes in
26 numbered locations.</p><p>Generic attributes are defined as four-component values
27 that are organized into an array. The first entry of this array
28 is numbered 0, and the size of the array is specified by the
29 implementation-dependent constant
30 <code class="constant">GL_MAX_VERTEX_ATTRIBS</code>. Individual elements
31 of this array can be modified with a
32 <code class="function">glVertexAttrib</code> call that specifies the
33 index of the element to be modified and a value for that
34 element.</p><p>These commands can be used to specify one, two, three, or
35 all four components of the generic vertex attribute specified by
36 <em class="parameter"><code>index</code></em>. A <code class="function">1</code> in the
37 name of the command indicates that only one value is passed, and
38 it will be used to modify the first component of the generic
39 vertex attribute. The second and third components will be set to
40 0, and the fourth component will be set to 1. Similarly, a
41 <code class="function">2</code> in the name of the command indicates that
42 values are provided for the first two components, the third
43 component will be set to 0, and the fourth component will be set
44 to 1. A <code class="function">3</code> in the name of the command
45 indicates that values are provided for the first three
46 components and the fourth component will be set to 1, whereas a
47 <code class="function">4</code> in the name indicates that values are
48 provided for all four components.</p><p>The letters <code class="function">s</code>,
49 <code class="function">f</code>, <code class="function">i</code>,
50 <code class="function">d</code>, <code class="function">ub</code>,
51 <code class="function">us</code>, and <code class="function">ui</code> indicate
52 whether the arguments are of type short, float, int, double,
53 unsigned byte, unsigned short, or unsigned int. When
54 <code class="function">v</code> is appended to the name, the commands can
55 take a pointer to an array of such values.</p><p>Additional capitalized letters can indicate further alterations
56 to the default behavior of the glVertexAttrib function:</p><p>
57 The commands containing <code class="function">N</code> indicate that
58 the arguments will be passed as fixed-point values that are
59 scaled to a normalized range according to the component
60 conversion rules defined by the OpenGL specification. Signed
61 values are understood to represent fixed-point values in the
62 range [-1,1], and unsigned values are understood to represent
63 fixed-point values in the range [0,1].
64 </p><p>
65 The commands containing <code class="function">I</code> indicate that
66 the arguments are extended to full signed or unsigned integers.
67 </p><p>
68 The commands containing <code class="function">P</code> indicate that
69 the arguments are stored as packed components within a larger
70 natural type.
71 </p><p>OpenGL Shading Language attribute variables are allowed to
72 be of type mat2, mat3, or mat4. Attributes of these types may be
73 loaded using the <code class="function">glVertexAttrib</code> entry
74 points. Matrices must be loaded into successive generic
75 attribute slots in column major order, with one column of the
76 matrix in each generic attribute slot.</p><p>A user-defined attribute variable declared in a vertex
77 shader can be bound to a generic attribute index by calling
78 <a href="glBindAttribLocation.xml"><span class="citerefentry"><span class="refentrytitle">glBindAttribLocation</span></span></a>.
79 This allows an application to use more descriptive variable
80 names in a vertex shader. A subsequent change to the specified
81 generic vertex attribute will be immediately reflected as a
82 change to the corresponding attribute variable in the vertex
83 shader.</p><p>The binding between a generic vertex attribute index and a
84 user-defined attribute variable in a vertex shader is part of
85 the state of a program object, but the current value of the
86 generic vertex attribute is not. The value of each generic
87 vertex attribute is part of current state, just like standard
88 vertex attributes, and it is maintained even if a different
89 program object is used.</p><p>An application may freely modify generic vertex attributes
90 that are not bound to a named vertex shader attribute variable.
91 These values are simply maintained as part of current state and
92 will not be accessed by the vertex shader. If a generic vertex
93 attribute bound to an attribute variable in a vertex shader is
94 not updated while the vertex shader is executing, the vertex
95 shader will repeatedly use the current value for the generic
96 vertex attribute.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>Generic vertex attributes can be updated at any time.</p><p>It is possible for an application to bind more than one
97 attribute name to the same generic vertex attribute index. This
98 is referred to as aliasing, and it is allowed only if just one
99 of the aliased attribute variables is active in the vertex
100 shader, or if no path through the vertex shader consumes more
101 than one of the attributes aliased to the same location. OpenGL
102 implementations are not required to do error checking to detect
103 aliasing, they are allowed to assume that aliasing will not
104 occur, and they are allowed to employ optimizations that work
105 only in the absence of aliasing.</p><p>There is no provision for binding standard vertex
106 attributes; therefore, it is not possible to alias generic
107 attributes with standard attributes.</p><p>
108 <code class="function">glVertexAttrib4bv</code>, <code class="function">glVertexAttrib4sv</code>,
109 <code class="function">glVertexAttrib4iv</code>, <code class="function">glVertexAttrib4ubv</code>,
110 <code class="function">glVertexAttrib4usv</code>, <code class="function">glVertexAttrib4uiv</code>, and
111 <code class="function">glVertexAttrib4N</code> versions are available only if the GL version is 3.1 or higher.
112 </p><p>
113 <code class="function">glVertexAttribP</code> versions are available only if the GL version is 3.3 or higher.
114 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p><code class="constant">GL_INVALID_VALUE</code> is generated if
115 <em class="parameter"><code>index</code></em> is greater than or equal to
116 <code class="constant">GL_MAX_VERTEX_ATTRIBS</code>.</p><p><code class="constant">GL_INVALID_ENUM</code> is generated if
117 <code class="function">glVertexAttribP</code> is used with a
118 <em class="parameter"><code>type</code></em> other than
119 <code class="constant">GL_INT_10_10_10_2</code> or
120 <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p><a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
121 with the argument <code class="constant">GL_CURRENT_PROGRAM</code></p><p><a href="glGetActiveAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glGetActiveAttrib</span></span></a>
122 with argument <em class="parameter"><code>program</code></em> and the index of an active
123 attribute variable</p><p><a href="glGetAttribLocation.xml"><span class="citerefentry"><span class="refentrytitle">glGetAttribLocation</span></span></a>
124 with argument <em class="parameter"><code>program</code></em> and an attribute
125 variable name</p><p><a href="glGetVertexAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glGetVertexAttrib</span></span></a>
126 with arguments <code class="constant">GL_CURRENT_VERTEX_ATTRIB</code> and
127 <em class="parameter"><code>index</code></em></p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p><a href="glBindAttribLocation.xml"><span class="citerefentry"><span class="refentrytitle">glBindAttribLocation</span></span></a>,
128 <a href="glVertexAttribPointer.xml"><span class="citerefentry"><span class="refentrytitle">glVertexAttribPointer</span></span></a></p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
129 Copyright <span class="trademark"></span>© 2003-2005 3Dlabs Inc. Ltd.
130 This material may be distributed subject to the terms and conditions set forth in
131 the Open Publication License, v 1.0, 8 June 1999.
132 <a href="http://opencontent.org/openpub/" target="_top">http://opencontent.org/openpub/</a>.
133 </p></div></div></body></html>