Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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 - OpenGL 4 Reference Pages</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>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><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" style="padding-bottom: 1em"><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><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribL1d</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">glVertexAttribL2d</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">glVertexAttribL3d</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"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribL4d</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></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" style="padding-bottom: 1em"><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><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribL1dv</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">glVertexAttribL2dv</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">glVertexAttribL3dv</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"><tr><td><code class="funcdef">void <b class="fsfunc">glVertexAttribL4dv</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></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 | |
c7b31271 | 15 | <code class="constant">GL_INT_2_10_10_10_REV</code> or <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> |
7faf1d71 AW |
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>The <code class="function">glVertexAttrib</code> family of entry points | |
22 | allows an application to pass generic vertex attributes in | |
23 | numbered locations.</p><p>Generic attributes are defined as four-component values | |
24 | that are organized into an array. The first entry of this array | |
25 | is numbered 0, and the size of the array is specified by the | |
26 | implementation-dependent constant | |
27 | <code class="constant">GL_MAX_VERTEX_ATTRIBS</code>. Individual elements | |
28 | of this array can be modified with a | |
29 | <code class="function">glVertexAttrib</code> call that specifies the | |
30 | index of the element to be modified and a value for that | |
31 | element.</p><p>These commands can be used to specify one, two, three, or | |
32 | all four components of the generic vertex attribute specified by | |
33 | <em class="parameter"><code>index</code></em>. A <code class="function">1</code> in the | |
34 | name of the command indicates that only one value is passed, and | |
35 | it will be used to modify the first component of the generic | |
36 | vertex attribute. The second and third components will be set to | |
37 | 0, and the fourth component will be set to 1. Similarly, a | |
38 | <code class="function">2</code> in the name of the command indicates that | |
39 | values are provided for the first two components, the third | |
40 | component will be set to 0, and the fourth component will be set | |
41 | to 1. A <code class="function">3</code> in the name of the command | |
42 | indicates that values are provided for the first three | |
43 | components and the fourth component will be set to 1, whereas a | |
44 | <code class="function">4</code> in the name indicates that values are | |
45 | provided for all four components.</p><p>The letters <code class="function">s</code>, | |
46 | <code class="function">f</code>, <code class="function">i</code>, | |
47 | <code class="function">d</code>, <code class="function">ub</code>, | |
48 | <code class="function">us</code>, and <code class="function">ui</code> indicate | |
49 | whether the arguments are of type short, float, int, double, | |
50 | unsigned byte, unsigned short, or unsigned int. When | |
51 | <code class="function">v</code> is appended to the name, the commands can | |
52 | take a pointer to an array of such values.</p><p>Additional capitalized letters can indicate further alterations | |
53 | to the default behavior of the glVertexAttrib function:</p><p> | |
54 | The commands containing <code class="function">N</code> indicate that | |
55 | the arguments will be passed as fixed-point values that are | |
56 | scaled to a normalized range according to the component | |
57 | conversion rules defined by the OpenGL specification. Signed | |
58 | values are understood to represent fixed-point values in the | |
59 | range [-1,1], and unsigned values are understood to represent | |
60 | fixed-point values in the range [0,1]. | |
61 | </p><p> | |
62 | The commands containing <code class="function">I</code> indicate that | |
63 | the arguments are extended to full signed or unsigned integers. | |
64 | </p><p> | |
65 | The commands containing <code class="function">P</code> indicate that | |
66 | the arguments are stored as packed components within a larger | |
67 | natural type. | |
68 | </p><p> | |
69 | The commands containing <code class="function">L</code> indicate that | |
70 | the arguments are full 64-bit quantities and should be passed directly | |
71 | to shader inputs declared as 64-bit double precision types. | |
72 | </p><p>OpenGL Shading Language attribute variables are allowed to | |
73 | be of type mat2, mat3, or mat4. Attributes of these types may be | |
74 | loaded using the <code class="function">glVertexAttrib</code> entry | |
75 | points. Matrices must be loaded into successive generic | |
76 | attribute slots in column major order, with one column of the | |
77 | matrix in each generic attribute slot.</p><p>A user-defined attribute variable declared in a vertex | |
78 | shader can be bound to a generic attribute index by calling | |
79 | <a href="glBindAttribLocation.xml"><span class="citerefentry"><span class="refentrytitle">glBindAttribLocation</span></span></a>. | |
80 | This allows an application to use more descriptive variable | |
81 | names in a vertex shader. A subsequent change to the specified | |
82 | generic vertex attribute will be immediately reflected as a | |
83 | change to the corresponding attribute variable in the vertex | |
84 | shader.</p><p>The binding between a generic vertex attribute index and a | |
85 | user-defined attribute variable in a vertex shader is part of | |
86 | the state of a program object, but the current value of the | |
87 | generic vertex attribute is not. The value of each generic | |
88 | vertex attribute is part of current state, just like standard | |
89 | vertex attributes, and it is maintained even if a different | |
90 | program object is used.</p><p>An application may freely modify generic vertex attributes | |
91 | that are not bound to a named vertex shader attribute variable. | |
92 | These values are simply maintained as part of current state and | |
93 | will not be accessed by the vertex shader. If a generic vertex | |
94 | attribute bound to an attribute variable in a vertex shader is | |
95 | not updated while the vertex shader is executing, the vertex | |
96 | shader will repeatedly use the current value for the generic | |
97 | 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 | |
98 | attribute name to the same generic vertex attribute index. This | |
99 | is referred to as aliasing, and it is allowed only if just one | |
100 | of the aliased attribute variables is active in the vertex | |
101 | shader, or if no path through the vertex shader consumes more | |
102 | than one of the attributes aliased to the same location. OpenGL | |
103 | implementations are not required to do error checking to detect | |
104 | aliasing, they are allowed to assume that aliasing will not | |
105 | occur, and they are allowed to employ optimizations that work | |
106 | only in the absence of aliasing.</p><p>There is no provision for binding standard vertex | |
107 | attributes; therefore, it is not possible to alias generic | |
108 | attributes with standard attributes.</p><p> | |
109 | <code class="function">glVertexAttribL</code> versions are available only if the GL version is 4.1 or higher. | |
110 | </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 | |
111 | <em class="parameter"><code>index</code></em> is greater than or equal to | |
112 | <code class="constant">GL_MAX_VERTEX_ATTRIBS</code>.</p><p><code class="constant">GL_INVALID_ENUM</code> is generated if | |
113 | <code class="function">glVertexAttribP</code> is used with a | |
114 | <em class="parameter"><code>type</code></em> other than | |
c7b31271 DH |
115 | <code class="constant">GL_INT_2_10_10_10_REV</code> or |
116 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>.</p><p><code class="constant">GL_INVALID_ENUM</code> is generated if | |
7faf1d71 AW |
117 | <code class="function">glVertexAttribL</code> is used with a |
118 | <em class="parameter"><code>type</code></em> other than | |
119 | <code class="constant">GL_DOUBLE</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> | |
120 | 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> | |
121 | with argument <em class="parameter"><code>program</code></em> and the index of an active | |
122 | attribute variable</p><p><a href="glGetAttribLocation.xml"><span class="citerefentry"><span class="refentrytitle">glGetAttribLocation</span></span></a> | |
123 | with argument <em class="parameter"><code>program</code></em> and an attribute | |
124 | variable name</p><p><a href="glGetVertexAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glGetVertexAttrib</span></span></a> | |
125 | with arguments <code class="constant">GL_CURRENT_VERTEX_ATTRIB</code> and | |
126 | <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>, | |
127 | <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> | |
128 | Copyright <span class="trademark"></span>© 2003-2005 3Dlabs Inc. Ltd. | |
129 | Copyright <span class="trademark"></span>© 2010 Khronos Group. | |
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> |