0ba2d6eef8c78a77ec15c267e6f12acf7cded812
[clinton/guile-figl.git] / upstream-man-pages / man3 / glMultiDrawElements.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="glMultiDrawElements">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glMultiDrawElements</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glMultiDrawElements</refname>
17 <refpurpose>render multiple sets of primitives by specifying indices of array data elements</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glMultiDrawElements</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 </funcprototype>
29 </funcsynopsis>
30 </refsynopsisdiv>
31 <!-- eqn: ignoring delim $$ -->
32 <refsect1 id="parameters"><title>Parameters</title>
33 <variablelist>
34 <varlistentry>
35 <term><parameter>mode</parameter></term>
36 <listitem>
37 <para>
38 Specifies what kind of primitives to render.
39 Symbolic constants
40 <constant>GL_POINTS</constant>,
41 <constant>GL_LINE_STRIP</constant>,
42 <constant>GL_LINE_LOOP</constant>,
43 <constant>GL_LINES</constant>,
44 <constant>GL_LINE_STRIP_ADJACENCY</constant>,
45 <constant>GL_LINES_ADJACENCY</constant>,
46 <constant>GL_TRIANGLE_STRIP</constant>,
47 <constant>GL_TRIANGLE_FAN</constant>,
48 <constant>GL_TRIANGLES</constant>,
49 <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and
50 <constant>GL_TRIANGLES_ADJACENCY</constant>
51 are accepted.
52 </para>
53 </listitem>
54 </varlistentry>
55 <varlistentry>
56 <term><parameter>count</parameter></term>
57 <listitem>
58 <para>
59 Points to an array of the elements counts.
60 </para>
61 </listitem>
62 </varlistentry>
63 <varlistentry>
64 <term><parameter>type</parameter></term>
65 <listitem>
66 <para>
67 Specifies the type of the values in <parameter>indices</parameter>. Must be one of
68 <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or
69 <constant>GL_UNSIGNED_INT</constant>.
70 </para>
71 </listitem>
72 </varlistentry>
73 <varlistentry>
74 <term><parameter>indices</parameter></term>
75 <listitem>
76 <para>
77 Specifies a pointer to the location where the indices are stored.
78 </para>
79 </listitem>
80 </varlistentry>
81 <varlistentry>
82 <term><parameter>primcount</parameter></term>
83 <listitem>
84 <para>
85 Specifies the size of the <parameter>count</parameter> array.
86 </para>
87 </listitem>
88 </varlistentry>
89 </variablelist>
90 </refsect1>
91 <refsect1 id="description"><title>Description</title>
92 <para>
93 <function>glMultiDrawElements</function> specifies multiple sets of geometric primitives with very few subroutine
94 calls. Instead of calling a GL function to pass each individual vertex,
95 normal, texture coordinate, edge flag, or color, you can prespecify
96 separate arrays of vertices, normals, and so on, and use them to construct a
97 sequence of primitives with a single call to <function>glMultiDrawElements</function>.
98 </para>
99 <para>
100 <function>glMultiDrawElements</function> is identical in operation to <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry> except that
101 <parameter>primcount</parameter> separate lists of elements are specified.
102 </para>
103 <para>
104 Vertex attributes that are modified by <function>glMultiDrawElements</function> have an
105 unspecified value after <function>glMultiDrawElements</function> returns. Attributes that aren't
106 modified maintain their previous values.
107 </para>
108 </refsect1>
109 <refsect1 id="notes"><title>Notes</title>
110 <para>
111 <constant>GL_LINE_STRIP_ADJACENCY</constant>,
112 <constant>GL_LINES_ADJACENCY</constant>,
113 <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and
114 <constant>GL_TRIANGLES_ADJACENCY</constant>
115 are available only if the GL version is 3.2 or greater.
116 </para>
117 </refsect1>
118 <refsect1 id="errors"><title>Errors</title>
119 <para>
120 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
121 </para>
122 <para>
123 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
124 </para>
125 <para>
126 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
127 enabled array or the element array and the buffer object's data store is currently mapped.
128 </para>
129 </refsect1>
130 <refsect1 id="seealso"><title>See Also</title>
131 <para>
132 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
133 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>
134 </para>
135 </refsect1>
136 <refsect1 id="Copyright"><title>Copyright</title>
137 <para>
138 Copyright <trademark class="copyright"></trademark> 1991-2006
139 Silicon Graphics, Inc. This document is licensed under the SGI
140 Free Software B License. For details, see
141 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
142 </para>
143 </refsect1>
144 </refentry>