Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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="glVertexAttribDivisor"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glVertexAttribDivisor</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glVertexAttribDivisor</refname> | |
17 | <refpurpose>modify the rate at which generic vertex attributes advance during instanced rendering</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glVertexAttribDivisor</function></funcdef> | |
23 | <paramdef>GLuint <parameter>index</parameter></paramdef> | |
24 | <paramdef>GLuint <parameter>divisor</parameter></paramdef> | |
25 | </funcprototype> | |
26 | </funcsynopsis> | |
27 | </refsynopsisdiv> | |
28 | <refsect1 id="parameters"><title>Parameters</title> | |
29 | <variablelist> | |
30 | <varlistentry> | |
31 | <term><parameter>index</parameter></term> | |
32 | <listitem> | |
33 | <para> | |
34 | Specify the index of the generic vertex attribute. | |
35 | </para> | |
36 | </listitem> | |
37 | </varlistentry> | |
38 | <varlistentry> | |
39 | <term><parameter>divisor</parameter></term> | |
40 | <listitem> | |
41 | <para> | |
42 | Specify the number of instances that will pass between updates of the generic attribute at slot <parameter>index</parameter>. | |
43 | </para> | |
44 | </listitem> | |
45 | </varlistentry> | |
46 | </variablelist> | |
47 | </refsect1> | |
48 | <refsect1 id="description"><title>Description</title> | |
49 | <para> | |
50 | <function>glVertexAttribDivisor</function> modifies the rate at which generic vertex attributes advance when rendering | |
51 | multiple instances of primitives in a single draw call. If <parameter>divisor</parameter> is zero, the attribute at slot | |
52 | <parameter>index</parameter> advances once per vertex. If <parameter>divisor</parameter> is non-zero, the attribute advances | |
53 | once per <parameter>divisor</parameter> instances of the set(s) of vertices being rendered. An attribute | |
54 | is referred to as instanced if its <constant>GL_VERTEX_ATTRIB_ARRAY_DIVISOR</constant> value is non-zero. | |
55 | </para> | |
56 | <para> | |
57 | <parameter>index</parameter> must be less than the value of <constant>GL_MAX_VERTEX_ATTRIBUTES</constant>. | |
58 | </para> | |
59 | </refsect1> | |
60 | <refsect1 id="notes"><title>Notes</title> | |
61 | <para> | |
62 | <function>glVertexAttribDivisor</function> is available only if the GL version is 3.3 or higher. | |
63 | </para> | |
64 | </refsect1> | |
65 | <refsect1 id="errors"><title>Errors</title> | |
66 | <para> | |
67 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater | |
68 | than or equal to the value of <constant>GL_MAX_VERTEX_ATTRIBUTES</constant>. | |
69 | </para> | |
70 | </refsect1> | |
71 | <refsect1 id="seealso"><title>See Also</title> | |
72 | <para> | |
73 | <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>, | |
74 | <citerefentry><refentrytitle>glEnableVertexAttribArray</refentrytitle></citerefentry>, | |
75 | <citerefentry><refentrytitle>glDisableVertexAttribArray</refentrytitle></citerefentry> | |
76 | </para> | |
77 | </refsect1> | |
78 | <refsect1 id="Copyright"><title>Copyright</title> | |
79 | <para> | |
80 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. | |
81 | This material may be distributed subject to the terms and conditions set forth in | |
82 | the Open Publication License, v 1.0, 8 June 1999. | |
83 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
84 | </para> | |
85 | </refsect1> | |
86 | </refentry> |