6c5deb7aa52d9732fdfe13fc03deb44a4f1ace86
[clinton/guile-figl.git] / upstream-man-pages / man4 / glDrawTransformFeedbackInstanced.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="glDrawTransformFeedbackInstanced">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glDrawTransformFeedbackInstanced</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glDrawTransformFeedbackInstanced</refname>
17 <refpurpose>render multiple instances of primitives using a count derived from a transform feedback object</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glDrawTransformFeedbackInstanced</function></funcdef>
23 <paramdef>GLenum <parameter>mode</parameter></paramdef>
24 <paramdef>GLuint <parameter>id</parameter></paramdef>
25 <paramdef>GLsizei <parameter>primcount</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>,
48 <constant>GL_TRIANGLES_ADJACENCY</constant>, and
49 <constant>GL_PATCHES</constant>
50 are accepted.
51 </para>
52 </listitem>
53 </varlistentry>
54 <varlistentry>
55 <term><parameter>id</parameter></term>
56 <listitem>
57 <para>
58 Specifies the name of a transform feedback object from which to retrieve a primitive count.
59 </para>
60 </listitem>
61 </varlistentry>
62 <varlistentry>
63 <term><parameter>primcount</parameter></term>
64 <listitem>
65 <para>
66 Specifies the number of instances of the geometry to render.
67 </para>
68 </listitem>
69 </varlistentry>
70 </variablelist>
71 </refsect1>
72 <refsect1 id="description"><title>Description</title>
73 <para>
74 <function>glDrawTransformFeedbackInstanced</function> draws multiple copies of a range of primitives of a type specified by <parameter>mode</parameter> using
75 a count retrieved from the transform feedback stream specified by <parameter>stream</parameter> of the transform feedback object
76 specified by <parameter>id</parameter>. Calling <function>glDrawTransformFeedbackInstanced</function>
77 is equivalent to calling <citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry> with <parameter>mode</parameter>
78 and <parameter>primcount</parameter> as specified, <parameter>first</parameter> set to zero, and <parameter>count</parameter> set to the number of vertices captured
79 on vertex stream zero the last time transform feedback was active on the transform feedback object named
80 by <parameter>id</parameter>.
81 </para>
82 <para>
83 Calling <citerefentry>glDrawTransformFeedbackInstanced</citerefentry> is equivalent to calling <function>glDrawTransformFeedbackStreamInstanced</function>
84 with <parameter>stream</parameter> set to zero.
85 </para>
86 </refsect1>
87 <refsect1 id="errors"><title>Errors</title>
88 <para>
89 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
90 </para>
91 <para>
92 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>id</parameter> is not the name of a transform feedback
93 object.
94 </para>
95 <para>
96 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>stream</parameter> is greater than or equal to
97 the value of <constant>GL_MAX_VERTEX_STREAMS</constant>.
98 </para>
99 <para>
100 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
101 enabled array and the buffer object's data store is currently mapped.
102 </para>
103 <para>
104 <constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
105 is incompatible with the input primitive type of the geometry shader in the currently installed program object.
106 </para>
107 <para>
108 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> is <constant>GL_PATCHES</constant>
109 and no tessellation control shader is active.
110 </para>
111 <para>
112 <constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>
113 has never been called while the transform feedback object named by <parameter>id</parameter> was bound.
114 </para>
115 </refsect1>
116 <refsect1 id="seealso"><title>See Also</title>
117 <para>
118 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
119 <citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
121 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
122 <citerefentry><refentrytitle>glDrawTransformFeedback</refentrytitle></citerefentry>,
123 <citerefentry><refentrytitle>glDrawTransformFeedbackStreamInstanced</refentrytitle></citerefentry>.
124 </para>
125 </refsect1>
126 <refsect1 id="Copyright"><title>Copyright</title>
127 <para>
128 Copyright <trademark class="copyright"></trademark> 2010-2011 Khronos Group.
129 This material may be distributed subject to the terms and conditions set forth in
130 the Open Publication License, v 1.0, 8 June 1999.
131 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
132 </para>
133 </refsect1>
134 </refentry>