7d74aba31e8131c3240a3e3c5f4cdf0a9d821923
[clinton/guile-figl.git] / upstream-man-pages / man3 / 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>const GLint * <parameter>first</parameter></paramdef>
25 <paramdef>const 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_LINE_STRIP_ADJACENCY</constant>,
44 <constant>GL_LINES_ADJACENCY</constant>,
45 <constant>GL_TRIANGLE_STRIP</constant>,
46 <constant>GL_TRIANGLE_FAN</constant>,
47 <constant>GL_TRIANGLES</constant>,
48 <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and
49 <constant>GL_TRIANGLES_ADJACENCY</constant>
50 are accepted.
51 </para>
52 </listitem>
53 </varlistentry>
54 <varlistentry>
55 <term><parameter>first</parameter></term>
56 <listitem>
57 <para>
58 Points to an array of starting indices in the enabled arrays.
59 </para>
60 </listitem>
61 </varlistentry>
62 <varlistentry>
63 <term><parameter>count</parameter></term>
64 <listitem>
65 <para>
66 Points to an array of the number of indices to be rendered.
67 </para>
68 </listitem>
69 </varlistentry>
70 <varlistentry>
71 <term><parameter>primcount</parameter></term>
72 <listitem>
73 <para>
74 Specifies the size of the first and count
75 </para>
76 </listitem>
77 </varlistentry>
78 </variablelist>
79 </refsect1>
80 <refsect1 id="description"><title>Description</title>
81 <para>
82 <function>glMultiDrawArrays</function> specifies multiple sets of geometric primitives
83 with very few subroutine calls. Instead of calling a GL procedure
84 to pass each individual vertex, normal, texture coordinate, edge
85 flag, or color, you can prespecify
86 separate arrays of vertices, normals, and colors and use them to
87 construct a sequence of primitives with a single
88 call to <function>glMultiDrawArrays</function>.
89 </para>
90 <para>
91 <function>glMultiDrawArrays</function> behaves identically to <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry> except that <parameter>primcount</parameter>
92 separate ranges of elements are specified instead.
93 </para>
94 <para>
95 When <function>glMultiDrawArrays</function> is called, it uses <parameter>count</parameter> sequential elements from each
96 enabled array to construct a sequence of geometric primitives,
97 beginning with element <parameter>first</parameter>. <parameter>mode</parameter> specifies what kind of
98 primitives are constructed, and how the array elements
99 construct those primitives.
100 </para>
101 <para>
102 Vertex attributes that are modified by <function>glMultiDrawArrays</function> have an
103 unspecified value after <function>glMultiDrawArrays</function> returns. Attributes that aren't
104 modified remain well defined.
105 </para>
106 </refsect1>
107 <refsect1 id="notes"><title>Notes</title>
108 <para>
109 <constant>GL_LINE_STRIP_ADJACENCY</constant>,
110 <constant>GL_LINES_ADJACENCY</constant>,
111 <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and
112 <constant>GL_TRIANGLES_ADJACENCY</constant>
113 are available only if the GL version is 3.2 or greater.
114 </para>
115 </refsect1>
116 <refsect1 id="errors"><title>Errors</title>
117 <para>
118 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
119 </para>
120 <para>
121 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
122 </para>
123 <para>
124 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
125 enabled array and the buffer object's data store is currently mapped.
126 </para>
127 </refsect1>
128 <refsect1 id="seealso"><title>See Also</title>
129 <para>
130 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>
132 </para>
133 </refsect1>
134 <refsect1 id="Copyright"><title>Copyright</title>
135 <para>
136 Copyright <trademark class="copyright"></trademark> 1991-2006
137 Silicon Graphics, Inc. This document is licensed under the SGI
138 Free Software B License. For details, see
139 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
140 </para>
141 </refsect1>
142 </refentry>