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=
"glMultiDrawElementsBaseVertex">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glMultiDrawElementsBaseVertex
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glMultiDrawElementsBaseVertex
</refname>
17 <refpurpose>render multiple sets of primitives by specifying indices of array data elements and an index to apply to each index
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glMultiDrawElementsBaseVertex
</function></funcdef>
23 <paramdef>GLenum
<parameter>mode
</parameter></paramdef>
24 <paramdef>const GLsizei *
<parameter>count
</parameter></paramdef>
25 <paramdef>GLenum
<parameter>type
</parameter></paramdef>
26 <paramdef>const GLvoid **
<parameter>indices
</parameter></paramdef>
27 <paramdef>GLsizei
<parameter>primcount
</parameter></paramdef>
28 <paramdef>GLint *
<parameter>basevertex
</parameter></paramdef>
32 <!-- eqn: ignoring delim $$ -->
33 <refsect1 id=
"parameters"><title>Parameters
</title>
36 <term><parameter>mode
</parameter></term>
39 Specifies what kind of primitives to render.
41 <constant>GL_POINTS
</constant>,
42 <constant>GL_LINE_STRIP
</constant>,
43 <constant>GL_LINE_LOOP
</constant>,
44 <constant>GL_LINES
</constant>,
45 <constant>GL_LINE_STRIP_ADJACENCY
</constant>,
46 <constant>GL_LINES_ADJACENCY
</constant>,
47 <constant>GL_TRIANGLE_STRIP
</constant>,
48 <constant>GL_TRIANGLE_FAN
</constant>,
49 <constant>GL_TRIANGLES
</constant>,
50 <constant>GL_TRIANGLE_STRIP_ADJACENCY
</constant>,
51 <constant>GL_TRIANGLES_ADJACENCY
</constant> and
<constant>GL_PATCHES
</constant>
57 <term><parameter>count
</parameter></term>
60 Points to an array of the elements counts.
65 <term><parameter>type
</parameter></term>
68 Specifies the type of the values in
<parameter>indices
</parameter>. Must be one of
69 <constant>GL_UNSIGNED_BYTE
</constant>,
<constant>GL_UNSIGNED_SHORT
</constant>, or
70 <constant>GL_UNSIGNED_INT
</constant>.
75 <term><parameter>indices
</parameter></term>
78 Specifies a pointer to the location where the indices are stored.
83 <term><parameter>primcount
</parameter></term>
86 Specifies the size of the
<parameter>count
</parameter> array.
91 <term><parameter>basevertex
</parameter></term>
94 Specifies a pointer to the location where the base vertices are stored.
100 <refsect1 id=
"description"><title>Description
</title>
102 <function>glMultiDrawElementsBaseVertex
</function> behaves identically to
<citerefentry><refentrytitle>glDrawElementsBaseVertex
</refentrytitle></citerefentry>,
103 except that
<parameter>primcount
</parameter> separate lists of elements are specifried instead.
106 It has the same effect as:
107 <programlisting> for (int i =
0; i
< <parameter>primcount
</parameter>; i++)
108 if (
<parameter>count
</parameter>[i]
> 0)
109 glDrawElementsBaseVertex(
<parameter>mode
</parameter>,
110 <parameter>count
</parameter>[i],
111 <parameter>type
</parameter>,
112 <parameter>indices[i]
</parameter>,
113 <parameter>basevertex[i]
</parameter>);
</programlisting>
116 <refsect1 id=
"notes"><title>Notes
</title>
118 <function>glMultiDrawElementsBaseVertex
</function> is available only if the GL version is
3.1 or greater.
121 <constant>GL_LINE_STRIP_ADJACENCY
</constant>,
122 <constant>GL_LINES_ADJACENCY
</constant>,
123 <constant>GL_TRIANGLE_STRIP_ADJACENCY
</constant> and
124 <constant>GL_TRIANGLES_ADJACENCY
</constant>
125 are available only if the GL version is
3.2 or greater.
128 <refsect1 id=
"errors"><title>Errors
</title>
130 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>mode
</parameter> is not an accepted value.
133 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>primcount
</parameter> is negative.
136 <constant>GL_INVALID_OPERATION
</constant> is generated if a non-zero buffer object name is bound to an
137 enabled array or the element array and the buffer object's data store is currently mapped.
140 <refsect1 id=
"seealso"><title>See Also
</title>
142 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>glDrawElementsBaseVertex
</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>glVertexAttribPointer
</refentrytitle></citerefentry>
148 <refsect1 id=
"Copyright"><title>Copyright
</title>
150 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
151 This material may be distributed subject to the terms and conditions set forth in
152 the Open Publication License, v
1.0,
8 June
1999.
153 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.