1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../css/manpage.css" type="text/css" />
7<title>glVertexAttribPointer</title>
8  </head>
9  <body>
10<h1><CODE>glVertexAttribPointer</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glVertexAttribPointer(
15     GLuint index,
16     GLint size,
17     GLenum type,
18     GLboolean normalized,
19     GLsizei stride,
20     const void * ptr
21);
22</pre>
23    </div>
24<h2>Arguments</h2>
25    <div class="section">
26      <table class="arguments">
27        <thead>
28          <tr>
29            <td width="15" />
30<th>Name</th>
31<td>Description</td>
32          </tr>
33        </thead>
34        <tr>
35<td>in</td>
36<th>index</th>
37<td>Vertex attribute index number</td>
38        </tr>
39        <tr>
40<td>in</td>
41<th>size</th>
42<td>Number of vertex elements</td>
43        </tr>
44        <tr>
45<td>in</td>
46<th>type</th>
47<td>Vertex data type</td>
48        </tr>
49        <tr>
50<td>in</td>
51<th>normalized</th>
52<td>Whether to normalize values</td>
53        </tr>
54        <tr>
55<td>in</td>
56<th>stride</th>
57<td>Number of bytes in the stride</td>
58        </tr>
59        <tr>
60<td>in</td>
61<th>ptr</th>
62<td>Pointer to vertex data (when vertex buffer object 0 is bound)</td>
63        </tr> </table>
64    </div>
65<h2>Return Values</h2>
66<div class="section">No values are returned. </div>
67<h2>Description</h2>
68    <div class="section">
69<p>Configures a vertex attribute array.</p><P>
70Set <span class="argument">index</span> to a value that is greater than 0 and at least one less than the value that can be obtained by <code>glGetIntegerv</code> with <code>GL_MAX_VERTEX_ATTRIBS</code> specified.
71
72            </P><P>
73Set <span class="argument">size</span> to the number of components: either 1, 2, 3, or 4.
74            </P><P>
75Set <span class="argument">type</span> to the data type: <CODE>GL_FLOAT</CODE>, <CODE>GL_SHORT</CODE>, <CODE>GL_BYTE</CODE>, or <CODE>GL_UNSIGNED_BYTE</CODE>. You cannot specify <CODE>GL_UNSIGNED_SHORT</CODE> or <CODE>GL_FIXED</CODE> from the OpenGL ES 2.0 standard.
76            </P><P>
77You must specify <CODE>GL_FALSE</CODE> for the <SPAN class="argument">normalized</SPAN> argument.
78            </P><P>
79When vertex buffer objects are not in use, set <span class="argument">ptr</span> to a pointer to vertex data. When vertex buffer objects are in use, set <span class="argument">ptr</span> to the offset of the region to start using within the vertex data currently bound to <CODE>GL_ARRAY_BUFFER</CODE>. You must set <span class="argument">ptr</span> to an address or offset value that is aligned to the type specified by <span class="argument">type</span>.
80            </P><P>
81Set <span class="argument">stride</span> to the byte offset between consecutive vertex data. When 0 is specified, vertex data is handled as if there are no gaps between it.
82            </P><P>
83This function generates the following errors.
84<TABLE><TR><TH>GL_INVALID_VALUE</TH><TD>The <span class="argument">index</span> or <span class="argument">size</span> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_VALUE</TH><TD>The <span class="argument">stride</span> argument was set to a negative value.</TD></TR><TR><TH>GL_INVALID_ENUM</TH><TD>The <span class="argument">type</span> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">normalized</span> argument was set to an invalid value.</TD></TR></TABLE><!-- source                      index、sizeに不正な値を指定した場合エラーGL_INVALID_VALUEを生成します。 strideに負の値を指定した場合エラーGL_INVALID_VALUEを生成します。 typeに不正な値を指定した場合エラーGL_INVALID_ENUMを生成します。 normalizedに不正な値を指定した場合エラーGL_INVALID_OPERATIONを生成します。                 --></P></div>
85<h2>Revision History</h2>
86    <div class="section">
87      <dl class="history">
88        <dt>2010/08/11</dt>
89<dd>Revised description for the <SPAN class="argument">normalized</SPAN> argument.<br />
90        </dd>
91        <dt>2010/01/07</dt>
92<dd>Initial version.<br />
93        </dd>
94      </dl>
95    </div>
96  <hr><p>CONFIDENTIAL</p></body>
97</html>