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=
"glBeginTransformFeedback">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glBeginTransformFeedback
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glBeginTransformFeedback
</refname>
17 <refpurpose>start transform feedback operation
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glBeginTransformFeedback
</function></funcdef>
23 <paramdef>GLenum
<parameter>primitiveMode
</parameter></paramdef>
27 <refsect1 id=
"parameters"><title>Parameters
</title>
30 <term><parameter>primitiveMode
</parameter></term>
33 Specify the output type of the primitives that will be recorded into the
34 buffer objects that are bound for transform feedback.
40 <refsynopsisdiv><title>C Specification
</title>
43 <funcdef>void
<function>glEndTransformFeedback
</function></funcdef>
44 <paramdef><parameter>void
</parameter></paramdef>
48 <refsect1 id=
"description"><title>Description
</title>
50 Transform feedback mode captures the values of varying variables written by the vertex shader (or, if active, the geometry shader).
51 Transform feedback is said to be active after a call to
<function>glBeginTransformFeedback
</function>
52 until a subsequent call to
<citerefentry><refentrytitle>glEndTransformFeedback
</refentrytitle></citerefentry>.
53 Transform feedback commands must be paired.
56 If no geometry shader is present, while transform feedback is active the
<parameter>mode
</parameter> parameter to
57 <citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry> must match those specified
58 in the following table:
60 <informaltable frame=
"topbot">
61 <tgroup cols=
"2" align=
"left">
62 <colspec colwidth=
"1.1*" />
63 <colspec colwidth=
"1*" />
66 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
67 Transform Feedback
<parameter>primitiveMode
</parameter>
69 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
70 Allowed Render Primitive
<parameter>modes
</parameter>
77 <constant>GL_POINTS
</constant>
80 <constant>GL_POINTS
</constant>
85 <constant>GL_LINES
</constant>
88 <constant>GL_LINES
</constant>,
<constant>GL_LINE_LOOP
</constant>,
<constant>GL_LINE_STRIP
</constant>,
89 <constant>GL_LINES_ADJACENCY
</constant>,
<constant>GL_LINE_STRIP_ADJACENCY
</constant>
94 <constant>GL_TRIANGLES
</constant>
97 <constant>GL_TRIANGLES
</constant>,
<constant>GL_TRIANGLE_STRIP
</constant>,
<constant>GL_TRIANGLE_FAN
</constant>,
98 <constant>GL_TRIANGLES_ADJACENCY
</constant>,
<constant>GL_TRIANGLE_STRIP_ADJACENCY
</constant>
105 If a geometry shader is present, the output primitive type from the geometry shader must match those
106 provided in the following table:
107 <informaltable frame=
"topbot">
108 <tgroup cols=
"2" align=
"left">
109 <colspec colwidth=
"1.1*" />
110 <colspec colwidth=
"1*" />
113 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
114 Transform Feedback
<parameter>primitiveMode
</parameter>
116 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
117 Allowed Geometry Shader Output Primitive Type
124 <constant>GL_POINTS
</constant>
127 <constant>points
</constant>
132 <constant>GL_LINES
</constant>
135 <constant>line_strip
</constant>
140 <constant>GL_TRIANGLES
</constant>
143 <constant>triangle_strip
</constant>
151 <refsect1 id=
"notes"><title>Notes
</title>
153 Geometry shaders, and the
<constant>GL_TRIANGLES_ADJACENCY
</constant>,
<constant>GL_TRIANGLE_STRIP_ADJACENCY
</constant>,
154 <constant>GL_LINES_ADJACENCY
</constant> and
<constant>GL_LINE_STRIP_ADJACENCY
</constant> primtive modes are available
155 only if the GL version is
3.2 or greater.
158 <refsect1 id=
"errors"><title>Errors
</title>
160 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glBeginTransformFeedback
</function> is executed
161 while transform feedback is active.
164 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glEndTransformFeedback
</function> is executed
165 while transform feedback is not active.
168 <constant>GL_INVALID_OPERATION
</constant> is generated by
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>
169 if no geometry shader is present, transform feedback is active and
<parameter>mode
</parameter> is not one of the allowed modes.
172 <constant>GL_INVALID_OPERATION
</constant> is generated by
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>
173 if a geometry shader is present, transform feedback is active and the output primitive type of the geometry shader does not
174 match the transform feedback
<parameter>primitiveMode
</parameter>.
177 <constant>GL_INVALID_OPERATION
</constant> is generated by
<function>glEndTransformFeedback
</function> if any binding
178 point used in transform feedback mode does not have a buffer object bound.
181 <constant>GL_INVALID_OPERATION
</constant> is generated by
<function>glEndTransformFeedback
</function> if no binding
182 points would be used, either because no program object is active of because the active program object has specified
183 no varying variables to record.
186 <refsect1 id=
"Copyright"><title>Copyright
</title>
188 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
189 This material may be distributed subject to the terms and conditions set forth in
190 the Open Publication License, v
1.0,
8 June
1999.
191 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.