Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="glMultiDrawElementsBaseVertex">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2010</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>glMultiDrawElementsBaseVertex</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glMultiDrawElementsBaseVertex</refname>\r | |
17 | <refpurpose>render multiple sets of primitives by specifying indices of array data elements and an index to apply to each index</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glMultiDrawElementsBaseVertex</function></funcdef>\r | |
23 | <paramdef>GLenum <parameter>mode</parameter></paramdef>\r | |
24 | <paramdef>const GLsizei *<parameter>count</parameter></paramdef>\r | |
25 | <paramdef>GLenum <parameter>type</parameter></paramdef>\r | |
26 | <paramdef>const GLvoid **<parameter>indices</parameter></paramdef>\r | |
27 | <paramdef>GLsizei <parameter>primcount</parameter></paramdef>\r | |
28 | <paramdef>GLint *<parameter>basevertex</parameter></paramdef>\r | |
29 | </funcprototype>\r | |
30 | </funcsynopsis>\r | |
31 | </refsynopsisdiv>\r | |
32 | <!-- eqn: ignoring delim $$ -->\r | |
33 | <refsect1 id="parameters"><title>Parameters</title>\r | |
34 | <variablelist>\r | |
35 | <varlistentry>\r | |
36 | <term><parameter>mode</parameter></term>\r | |
37 | <listitem>\r | |
38 | <para>\r | |
39 | Specifies what kind of primitives to render.\r | |
40 | Symbolic constants\r | |
41 | <constant>GL_POINTS</constant>,\r | |
42 | <constant>GL_LINE_STRIP</constant>,\r | |
43 | <constant>GL_LINE_LOOP</constant>,\r | |
44 | <constant>GL_LINES</constant>,\r | |
45 | <constant>GL_LINE_STRIP_ADJACENCY</constant>,\r | |
46 | <constant>GL_LINES_ADJACENCY</constant>,\r | |
47 | <constant>GL_TRIANGLE_STRIP</constant>,\r | |
48 | <constant>GL_TRIANGLE_FAN</constant>,\r | |
49 | <constant>GL_TRIANGLES</constant>,\r | |
50 | <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and\r | |
51 | <constant>GL_TRIANGLES_ADJACENCY</constant>\r | |
52 | are accepted.\r | |
53 | </para>\r | |
54 | </listitem>\r | |
55 | </varlistentry>\r | |
56 | <varlistentry>\r | |
57 | <term><parameter>count</parameter></term>\r | |
58 | <listitem>\r | |
59 | <para>\r | |
60 | Points to an array of the elements counts.\r | |
61 | </para>\r | |
62 | </listitem>\r | |
63 | </varlistentry>\r | |
64 | <varlistentry>\r | |
65 | <term><parameter>type</parameter></term>\r | |
66 | <listitem>\r | |
67 | <para>\r | |
68 | Specifies the type of the values in <parameter>indices</parameter>. Must be one of\r | |
69 | <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or\r | |
70 | <constant>GL_UNSIGNED_INT</constant>.\r | |
71 | </para>\r | |
72 | </listitem>\r | |
73 | </varlistentry>\r | |
74 | <varlistentry>\r | |
75 | <term><parameter>indices</parameter></term>\r | |
76 | <listitem>\r | |
77 | <para>\r | |
78 | Specifies a pointer to the location where the indices are stored.\r | |
79 | </para>\r | |
80 | </listitem>\r | |
81 | </varlistentry>\r | |
82 | <varlistentry>\r | |
83 | <term><parameter>primcount</parameter></term>\r | |
84 | <listitem>\r | |
85 | <para>\r | |
86 | Specifies the size of the <parameter>count</parameter> array.\r | |
87 | </para>\r | |
88 | </listitem>\r | |
89 | </varlistentry>\r | |
90 | <varlistentry>\r | |
91 | <term><parameter>basevertex</parameter></term>\r | |
92 | <listitem>\r | |
93 | <para>\r | |
94 | Specifies a pointer to the location where the base vertices are stored.\r | |
95 | </para>\r | |
96 | </listitem>\r | |
97 | </varlistentry>\r | |
98 | </variablelist>\r | |
99 | </refsect1>\r | |
100 | <refsect1 id="description"><title>Description</title>\r | |
101 | <para>\r | |
102 | <function>glMultiDrawElementsBaseVertex</function> behaves identically to <citerefentry><refentrytitle>glDrawElementsBaseVertex</refentrytitle></citerefentry>,\r | |
103 | except that <parameter>primcount</parameter> separate lists of elements are specifried instead.\r | |
104 | </para>\r | |
105 | <para>\r | |
106 | It has the same effect as:\r | |
107 | <programlisting> for (int i = 0; i < <parameter>primcount</parameter>; i++)\r | |
108 | if (<parameter>count</parameter>[i] > 0)\r | |
109 | glDrawElementsBaseVertex(<parameter>mode</parameter>,\r | |
110 | <parameter>count</parameter>[i],\r | |
111 | <parameter>type</parameter>,\r | |
112 | <parameter>indices[i]</parameter>,\r | |
113 | <parameter>basevertex[i]</parameter>);</programlisting>\r | |
114 | </para>\r | |
115 | </refsect1>\r | |
116 | <refsect1 id="notes"><title>Notes</title>\r | |
117 | <para>\r | |
118 | <function>glMultiDrawElementsBaseVertex</function> is available only if the GL version is 3.1 or greater.\r | |
119 | </para>\r | |
120 | <para>\r | |
121 | <constant>GL_LINE_STRIP_ADJACENCY</constant>,\r | |
122 | <constant>GL_LINES_ADJACENCY</constant>,\r | |
123 | <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and\r | |
124 | <constant>GL_TRIANGLES_ADJACENCY</constant>\r | |
125 | are available only if the GL version is 3.2 or greater.\r | |
126 | </para>\r | |
127 | </refsect1>\r | |
128 | <refsect1 id="errors"><title>Errors</title>\r | |
129 | <para>\r | |
130 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.\r | |
131 | </para>\r | |
132 | <para>\r | |
133 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.\r | |
134 | </para>\r | |
135 | <para>\r | |
136 | <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an\r | |
137 | enabled array or the element array and the buffer object's data store is currently mapped.\r | |
138 | </para>\r | |
139 | </refsect1>\r | |
140 | <refsect1 id="seealso"><title>See Also</title>\r | |
141 | <para>\r | |
142 | <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,\r | |
143 | <citerefentry><refentrytitle>glDrawElementsBaseVertex</refentrytitle></citerefentry>,\r | |
144 | <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,\r | |
145 | <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>\r | |
146 | </para>\r | |
147 | </refsect1>\r | |
148 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
149 | <para>\r | |
150 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r | |
151 | This material may be distributed subject to the terms and conditions set forth in \r | |
152 | the Open Publication License, v 1.0, 8 June 1999.\r | |
153 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
154 | </para>\r | |
155 | </refsect1>\r | |
156 | </refentry>\r |