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