1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?xml-stylesheet type=
"text/xsl" href=
"mathml.xsl"?><html xmlns=
"http://www.w3.org/1999/xhtml" xmlns:
pref=
"http://www.w3.org/2002/Math/preference" pref:
renderer=
"mathplayer-dl"><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" /><link rel=
"stylesheet" type=
"text/css" href=
"opengl-man.css" /><title>glDrawTransformFeedbackInstanced - OpenGL
4 Reference Pages
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.69.1" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glDrawTransformFeedbackInstanced"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glDrawTransformFeedbackInstanced — render multiple instances of primitives using a count derived from a transform feedback object
</p></div><div class=
"refsynopsisdiv"><h2>C Specification
</h2><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glDrawTransformFeedbackInstanced
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">mode
</var>,
</td></tr><tr><td> </td><td>GLuint
</td><td><var class=
"pdparam">id
</var>,
</td></tr><tr><td> </td><td>GLsizei
</td><td><var class=
"pdparam">primcount
</var><code>)
</code>;
</td></tr></table></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"parameters"></a><h2>Parameters
</h2><div class=
"variablelist"><dl><dt><span class=
"term"><em class=
"parameter"><code>mode
</code></em></span></dt><dd><p>
5 Specifies what kind of primitives to render.
7 <code class=
"constant">GL_POINTS
</code>,
8 <code class=
"constant">GL_LINE_STRIP
</code>,
9 <code class=
"constant">GL_LINE_LOOP
</code>,
10 <code class=
"constant">GL_LINES
</code>,
11 <code class=
"constant">GL_LINE_STRIP_ADJACENCY
</code>,
12 <code class=
"constant">GL_LINES_ADJACENCY
</code>,
13 <code class=
"constant">GL_TRIANGLE_STRIP
</code>,
14 <code class=
"constant">GL_TRIANGLE_FAN
</code>,
15 <code class=
"constant">GL_TRIANGLES
</code>,
16 <code class=
"constant">GL_TRIANGLE_STRIP_ADJACENCY
</code>,
17 <code class=
"constant">GL_TRIANGLES_ADJACENCY
</code>, and
18 <code class=
"constant">GL_PATCHES
</code>
20 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>id
</code></em></span></dt><dd><p>
21 Specifies the name of a transform feedback object from which to retrieve a primitive count.
22 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>primcount
</code></em></span></dt><dd><p>
23 Specifies the number of instances of the geometry to render.
24 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
25 <code class=
"function">glDrawTransformFeedbackInstanced
</code> draws multiple copies of a range of primitives of a type specified by
<em class=
"parameter"><code>mode
</code></em> using
26 a count retrieved from the transform feedback stream specified by
<em class=
"parameter"><code>stream
</code></em> of the transform feedback object
27 specified by
<em class=
"parameter"><code>id
</code></em>. Calling
<code class=
"function">glDrawTransformFeedbackInstanced
</code>
28 is equivalent to calling
<a href=
"glDrawArraysInstanced.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawArraysInstanced
</span></span></a> with
<em class=
"parameter"><code>mode
</code></em>
29 and
<em class=
"parameter"><code>primcount
</code></em> as specified,
<em class=
"parameter"><code>first
</code></em> set to zero, and
<em class=
"parameter"><code>count
</code></em> set to the number of vertices captured
30 on vertex stream zero the last time transform feedback was active on the transform feedback object named
31 by
<em class=
"parameter"><code>id
</code></em>.
33 Calling
<a href=
".xml"><span class=
"citerefentry">glDrawTransformFeedbackInstanced
</span></a> is equivalent to calling
<code class=
"function">glDrawTransformFeedbackStreamInstanced
</code>
34 with
<em class=
"parameter"><code>stream
</code></em> set to zero.
35 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
36 <code class=
"constant">GL_INVALID_ENUM
</code> is generated if
<em class=
"parameter"><code>mode
</code></em> is not an accepted value.
38 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>id
</code></em> is not the name of a transform feedback
41 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>stream
</code></em> is greater than or equal to
42 the value of
<code class=
"constant">GL_MAX_VERTEX_STREAMS
</code>.
44 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if a non-zero buffer object name is bound to an
45 enabled array and the buffer object's data store is currently mapped.
47 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if a geometry shader is active and
<em class=
"parameter"><code>mode
</code></em>
48 is incompatible with the input primitive type of the geometry shader in the currently installed program object.
50 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_PATCHES
</code>
51 and no tessellation control shader is active.
53 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<a href=
"glEndTransformFeedback.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEndTransformFeedback
</span></span></a>
54 has never been called while the transform feedback object named by
<em class=
"parameter"><code>id
</code></em> was bound.
55 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
56 <a href=
"glDrawArrays.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawArrays
</span></span></a>,
57 <a href=
"glDrawArraysInstanced.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawArraysInstanced
</span></span></a>,
58 <a href=
"glDrawElements.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawElements
</span></span></a>,
59 <a href=
"glDrawRangeElements.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawRangeElements
</span></span></a>,
60 <a href=
"glDrawTransformFeedback.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawTransformFeedback
</span></span></a>,
61 <a href=
"glDrawTransformFeedbackStreamInstanced.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawTransformFeedbackStreamInstanced
</span></span></a>.
62 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
63 Copyright
<span class=
"trademark"></span>©
2010-
2011 Khronos Group.
64 This material may be distributed subject to the terms and conditions set forth in
65 the Open Publication License, v
1.0,
8 June
1999.
66 <a href=
"http://opencontent.org/openpub/" target=
"_top">http://opencontent.org/openpub/
</a>.
67 </p></div></div></body></html>