include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glMultiDrawArrays.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="glMultiDrawArrays">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glMultiDrawArrays</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glMultiDrawArrays</refname>
17 <refpurpose>render multiple sets of primitives from array data</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glMultiDrawArrays</function></funcdef>
23 <paramdef>GLenum <parameter>mode</parameter></paramdef>
24 <paramdef>GLint * <parameter>first</parameter></paramdef>
25 <paramdef>GLsizei * <parameter>count</parameter></paramdef>
26 <paramdef>GLsizei <parameter>primcount</parameter></paramdef>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <!-- eqn: ignoring delim $$ -->
31 <refsect1 id="parameters"><title>Parameters</title>
32 <variablelist>
33 <varlistentry>
34 <term><parameter>mode</parameter></term>
35 <listitem>
36 <para>
37 Specifies what kind of primitives to render.
38 Symbolic constants
39 <constant>GL_POINTS</constant>,
40 <constant>GL_LINE_STRIP</constant>,
41 <constant>GL_LINE_LOOP</constant>,
42 <constant>GL_LINES</constant>,
43 <constant>GL_TRIANGLE_STRIP</constant>,
44 <constant>GL_TRIANGLE_FAN</constant>,
45 <constant>GL_TRIANGLES</constant>,
46 <constant>GL_QUAD_STRIP</constant>,
47 <constant>GL_QUADS</constant>,
48 and <constant>GL_POLYGON</constant> are accepted.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term><parameter>first</parameter></term>
54 <listitem>
55 <para>
56 Points to an array of starting indices in the enabled arrays.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term><parameter>count</parameter></term>
62 <listitem>
63 <para>
64 Points to an array of the number of indices to be rendered.
65 </para>
66 </listitem>
67 </varlistentry>
68 <varlistentry>
69 <term><parameter>primcount</parameter></term>
70 <listitem>
71 <para>
72 Specifies the size of the first and count
73 </para>
74 </listitem>
75 </varlistentry>
76 </variablelist>
77 </refsect1>
78 <refsect1 id="description"><title>Description</title>
79 <para>
80 <function>glMultiDrawArrays</function> specifies multiple sets of geometric primitives
81 with very few subroutine calls. Instead of calling a GL procedure
82 to pass each individual vertex, normal, texture coordinate, edge
83 flag, or color, you can prespecify
84 separate arrays of vertices, normals, and colors and use them to
85 construct a sequence of primitives with a single
86 call to <function>glMultiDrawArrays</function>.
87 </para>
88 <para>
89 <function>glMultiDrawArrays</function> behaves identically to <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry> except that <parameter>primcount</parameter>
90 separate ranges of elements are specified instead.
91 </para>
92 <para>
93 When <function>glMultiDrawArrays</function> is called, it uses <parameter>count</parameter> sequential elements from each
94 enabled array to construct a sequence of geometric primitives,
95 beginning with element <parameter>first</parameter>. <parameter>mode</parameter> specifies what kind of
96 primitives are constructed, and how the array elements
97 construct those primitives. If <constant>GL_VERTEX_ARRAY</constant> is not enabled, no
98 geometric primitives are generated.
99 </para>
100 <para>
101 Vertex attributes that are modified by <function>glMultiDrawArrays</function> have an
102 unspecified value after <function>glMultiDrawArrays</function> returns. For example, if
103 <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
104 undefined after <function>glMultiDrawArrays</function> executes. Attributes that aren't
105 modified remain well defined.
106 </para>
107 </refsect1>
108 <refsect1 id="notes"><title>Notes</title>
109 <para>
110 <function>glMultiDrawArrays</function> is available only if the GL version is 1.4 or greater.
111 </para>
112 <para>
113 <function>glMultiDrawArrays</function> is included in display lists. If <function>glMultiDrawArrays</function> is entered into a
114 display list,
115 the necessary array data (determined by the array pointers and
116 enables) is also
117 entered into the display list. Because the array pointers and
118 enables are client-side state, their values affect display lists
119 when the lists are created, not when the lists are executed.
120 </para>
121 </refsect1>
122 <refsect1 id="errors"><title>Errors</title>
123 <para>
124 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
125 </para>
126 <para>
127 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
128 </para>
129 <para>
130 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
131 enabled array and the buffer object's data store is currently mapped.
132 </para>
133 <para>
134 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMultiDrawArrays</function> is executed between
135 the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
136 </para>
137 </refsect1>
138 <refsect1 id="seealso"><title>See Also</title>
139 <para>
140 <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
148 <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
151 <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>,
152 <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
153 </para>
154 </refsect1>
155 <refsect1 id="Copyright"><title>Copyright</title>
156 <para>
157 Copyright <trademark class="copyright"></trademark> 1991-2006
158 Silicon Graphics, Inc. This document is licensed under the SGI
159 Free Software B License. For details, see
160 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
161 </para>
162 </refsect1>
163 </refentry>