rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / 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_TRIANGLE_STRIP</constant>,
45 <constant>GL_TRIANGLE_FAN</constant>,
46 <constant>GL_TRIANGLES</constant>,
47 <constant>GL_QUAD_STRIP</constant>,
48 <constant>GL_QUADS</constant>,
49 and <constant>GL_POLYGON</constant> are accepted.
50 </para>
51 </listitem>
52 </varlistentry>
53 <varlistentry>
54 <term><parameter>count</parameter></term>
55 <listitem>
56 <para>
57 Points to an array of the elements counts.
58 </para>
59 </listitem>
60 </varlistentry>
61 <varlistentry>
62 <term><parameter>type</parameter></term>
63 <listitem>
64 <para>
65 Specifies the type of the values in <parameter>indices</parameter>. Must be one of
66 <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or
67 <constant>GL_UNSIGNED_INT</constant>.
68 </para>
69 </listitem>
70 </varlistentry>
71 <varlistentry>
72 <term><parameter>indices</parameter></term>
73 <listitem>
74 <para>
75 Specifies a pointer to the location where the indices are stored.
76 </para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><parameter>primcount</parameter></term>
81 <listitem>
82 <para>
83 Specifies the size of the <parameter>count</parameter> array.
84 </para>
85 </listitem>
86 </varlistentry>
87 </variablelist>
88 </refsect1>
89 <refsect1 id="description"><title>Description</title>
90 <para>
91 <function>glMultiDrawElements</function> specifies multiple sets of geometric primitives with very few subroutine
92 calls. Instead of calling a GL function to pass each individual vertex,
93 normal, texture coordinate, edge flag, or color, you can prespecify
94 separate arrays of vertices, normals, and so on, and use them to construct a
95 sequence of primitives with a single call to <function>glMultiDrawElements</function>.
96 </para>
97 <para>
98 <function>glMultiDrawElements</function> is identical in operation to <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry> except that
99 <parameter>primcount</parameter> separate lists of elements are specified.
100 </para>
101 <para>
102 Vertex attributes that are modified by <function>glMultiDrawElements</function> have an
103 unspecified value after <function>glMultiDrawElements</function> returns. For example, if
104 <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
105 undefined after <function>glMultiDrawElements</function> executes. Attributes that aren't
106 modified maintain their previous values.
107 </para>
108 </refsect1>
109 <refsect1 id="notes"><title>Notes</title>
110 <para>
111 <function>glMultiDrawElements</function> is available only if the GL version is 1.4 or greater.
112 </para>
113 <para>
114 <function>glMultiDrawElements</function> is included in display lists. If <function>glMultiDrawElements</function> is entered into a
115 display list,
116 the necessary array data (determined by the array pointers and
117 enables) is also
118 entered into the display list. Because the array pointers and
119 enables are client-side state, their values affect display lists
120 when the lists are created, not when the lists are executed.
121 </para>
122 </refsect1>
123 <refsect1 id="errors"><title>Errors</title>
124 <para>
125 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
126 </para>
127 <para>
128 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
129 </para>
130 <para>
131 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
132 enabled array or the element array and the buffer object's data store is currently mapped.
133 </para>
134 <para>
135 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMultiDrawElements</function> is executed between
136 the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
137 </para>
138 </refsect1>
139 <refsect1 id="seealso"><title>See Also</title>
140 <para>
141 <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
148 <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
151 <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
152 <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>,
153 <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
154 </para>
155 </refsect1>
156 <refsect1 id="Copyright"><title>Copyright</title>
157 <para>
158 Copyright <trademark class="copyright"></trademark> 1991-2006
159 Silicon Graphics, Inc. This document is licensed under the SGI
160 Free Software B License. For details, see
161 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
162 </para>
163 </refsect1>
164 </refentry>