21223d868fd6a49c85d1b7f13ba55125815195d5
[clinton/guile-figl.git] / upstream-man-pages / man4 / glMultiDrawElementsBaseVertex.xml
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">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glMultiDrawElementsBaseVertex</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
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>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
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>
29 </funcprototype>
30 </funcsynopsis>
31 </refsynopsisdiv>
32 <!-- eqn: ignoring delim $$ -->
33 <refsect1 id="parameters"><title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term><parameter>mode</parameter></term>
37 <listitem>
38 <para>
39 Specifies what kind of primitives to render.
40 Symbolic constants
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>
52 are accepted.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>count</parameter></term>
58 <listitem>
59 <para>
60 Points to an array of the elements counts.
61 </para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><parameter>type</parameter></term>
66 <listitem>
67 <para>
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>.
71 </para>
72 </listitem>
73 </varlistentry>
74 <varlistentry>
75 <term><parameter>indices</parameter></term>
76 <listitem>
77 <para>
78 Specifies a pointer to the location where the indices are stored.
79 </para>
80 </listitem>
81 </varlistentry>
82 <varlistentry>
83 <term><parameter>primcount</parameter></term>
84 <listitem>
85 <para>
86 Specifies the size of the <parameter>count</parameter> array.
87 </para>
88 </listitem>
89 </varlistentry>
90 <varlistentry>
91 <term><parameter>basevertex</parameter></term>
92 <listitem>
93 <para>
94 Specifies a pointer to the location where the base vertices are stored.
95 </para>
96 </listitem>
97 </varlistentry>
98 </variablelist>
99 </refsect1>
100 <refsect1 id="description"><title>Description</title>
101 <para>
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.
104 </para>
105 <para>
106 It has the same effect as:
107 <programlisting> for (int i = 0; i &lt; <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>
114 </para>
115 </refsect1>
116 <refsect1 id="notes"><title>Notes</title>
117 <para>
118 <function>glMultiDrawElementsBaseVertex</function> is available only if the GL version is 3.1 or greater.
119 </para>
120 <para>
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.
126 </para>
127 </refsect1>
128 <refsect1 id="errors"><title>Errors</title>
129 <para>
130 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
131 </para>
132 <para>
133 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
134 </para>
135 <para>
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.
138 </para>
139 </refsect1>
140 <refsect1 id="seealso"><title>See Also</title>
141 <para>
142 <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>glDrawElementsBaseVertex</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>
146 </para>
147 </refsect1>
148 <refsect1 id="Copyright"><title>Copyright</title>
149 <para>
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>.
154 </para>
155 </refsect1>
156 </refentry>