Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="glBeginTransformFeedback">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2010</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>glBeginTransformFeedback</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glBeginTransformFeedback</refname>\r | |
17 | <refpurpose>start transform feedback operation</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glBeginTransformFeedback</function></funcdef>\r | |
23 | <paramdef>GLenum <parameter>primitiveMode</parameter></paramdef>\r | |
24 | </funcprototype>\r | |
25 | </funcsynopsis>\r | |
26 | </refsynopsisdiv>\r | |
27 | <refsect1 id="parameters"><title>Parameters</title>\r | |
28 | <variablelist>\r | |
29 | <varlistentry>\r | |
30 | <term><parameter>primitiveMode</parameter></term>\r | |
31 | <listitem>\r | |
32 | <para>\r | |
33 | Specify the output type of the primitives that will be recorded into the\r | |
34 | buffer objects that are bound for transform feedback.\r | |
35 | </para>\r | |
36 | </listitem>\r | |
37 | </varlistentry>\r | |
38 | </variablelist>\r | |
39 | </refsect1>\r | |
40 | <refsynopsisdiv><title>C Specification</title>\r | |
41 | <funcsynopsis>\r | |
42 | <funcprototype>\r | |
43 | <funcdef>void <function>glEndTransformFeedback</function></funcdef>\r | |
44 | <paramdef><parameter>void</parameter></paramdef>\r | |
45 | </funcprototype>\r | |
46 | </funcsynopsis>\r | |
47 | </refsynopsisdiv>\r | |
48 | <refsect1 id="description"><title>Description</title>\r | |
49 | <para>\r | |
50 | Transform feedback mode captures the values of varying variables written by the vertex shader (or, if active, the geometry shader).\r | |
51 | Transform feedback is said to be active after a call to <function>glBeginTransformFeedback</function>\r | |
52 | until a subsequent call to <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>.\r | |
53 | Transform feedback commands must be paired.\r | |
54 | </para>\r | |
55 | <para>\r | |
56 | If no geometry shader is present, while transform feedback is active the <parameter>mode</parameter> parameter to\r | |
57 | <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry> must match those specified\r | |
58 | in the following table:\r | |
59 | </para>\r | |
60 | <informaltable frame="topbot">\r | |
61 | <tgroup cols="2" align="left">\r | |
62 | <colspec colwidth="1.1*" />\r | |
63 | <colspec colwidth="1*" />\r | |
64 | <thead>\r | |
65 | <row>\r | |
66 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
67 | Transform Feedback <parameter>primitiveMode</parameter>\r | |
68 | </emphasis></entry>\r | |
69 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
70 | Allowed Render Primitive <parameter>modes</parameter>\r | |
71 | </emphasis></entry>\r | |
72 | </row>\r | |
73 | </thead>\r | |
74 | <tbody>\r | |
75 | <row>\r | |
76 | <entry align="left">\r | |
77 | <constant>GL_POINTS</constant>\r | |
78 | </entry>\r | |
79 | <entry align="left">\r | |
80 | <constant>GL_POINTS</constant>\r | |
81 | </entry>\r | |
82 | </row>\r | |
83 | <row>\r | |
84 | <entry align="left">\r | |
85 | <constant>GL_LINES</constant>\r | |
86 | </entry>\r | |
87 | <entry align="left">\r | |
88 | <constant>GL_LINES</constant>, <constant>GL_LINE_LOOP</constant>, <constant>GL_LINE_STRIP</constant>,\r | |
89 | <constant>GL_LINES_ADJACENCY</constant>, <constant>GL_LINE_STRIP_ADJACENCY</constant>\r | |
90 | </entry>\r | |
91 | </row>\r | |
92 | <row>\r | |
93 | <entry align="left">\r | |
94 | <constant>GL_TRIANGLES</constant>\r | |
95 | </entry>\r | |
96 | <entry align="left">\r | |
97 | <constant>GL_TRIANGLES</constant>, <constant>GL_TRIANGLE_STRIP</constant>, <constant>GL_TRIANGLE_FAN</constant>,\r | |
98 | <constant>GL_TRIANGLES_ADJACENCY</constant>, <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>\r | |
99 | </entry>\r | |
100 | </row>\r | |
101 | </tbody>\r | |
102 | </tgroup>\r | |
103 | </informaltable>\r | |
104 | <para>\r | |
105 | If a geometry shader is present, the output primitive type from the geometry shader must match those\r | |
106 | provided in the following table:\r | |
107 | <informaltable frame="topbot">\r | |
108 | <tgroup cols="2" align="left">\r | |
109 | <colspec colwidth="1.1*" />\r | |
110 | <colspec colwidth="1*" />\r | |
111 | <thead>\r | |
112 | <row>\r | |
113 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
114 | Transform Feedback <parameter>primitiveMode</parameter>\r | |
115 | </emphasis></entry>\r | |
116 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
117 | Allowed Geometry Shader Output Primitive Type\r | |
118 | </emphasis></entry>\r | |
119 | </row>\r | |
120 | </thead>\r | |
121 | <tbody>\r | |
122 | <row>\r | |
123 | <entry align="left">\r | |
124 | <constant>GL_POINTS</constant>\r | |
125 | </entry>\r | |
126 | <entry align="left">\r | |
127 | <constant>points</constant>\r | |
128 | </entry>\r | |
129 | </row>\r | |
130 | <row>\r | |
131 | <entry align="left">\r | |
132 | <constant>GL_LINES</constant>\r | |
133 | </entry>\r | |
134 | <entry align="left">\r | |
135 | <constant>line_strip</constant>\r | |
136 | </entry>\r | |
137 | </row>\r | |
138 | <row>\r | |
139 | <entry align="left">\r | |
140 | <constant>GL_TRIANGLES</constant>\r | |
141 | </entry>\r | |
142 | <entry align="left">\r | |
143 | <constant>triangle_strip</constant>\r | |
144 | </entry>\r | |
145 | </row>\r | |
146 | </tbody>\r | |
147 | </tgroup>\r | |
148 | </informaltable>\r | |
149 | </para>\r | |
150 | </refsect1>\r | |
151 | <refsect1 id="notes"><title>Notes</title>\r | |
152 | <para>\r | |
153 | Geometry shaders, and the <constant>GL_TRIANGLES_ADJACENCY</constant>, <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,\r | |
154 | <constant>GL_LINES_ADJACENCY</constant> and <constant>GL_LINE_STRIP_ADJACENCY</constant> primtive modes are available\r | |
155 | only if the GL version is 3.2 or greater.\r | |
156 | </para>\r | |
157 | </refsect1>\r | |
158 | <refsect1 id="errors"><title>Errors</title>\r | |
159 | <para>\r | |
160 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBeginTransformFeedback</function> is executed\r | |
161 | while transform feedback is active.\r | |
162 | </para>\r | |
163 | <para>\r | |
164 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glEndTransformFeedback</function> is executed\r | |
165 | while transform feedback is not active.\r | |
166 | </para>\r | |
167 | <para>\r | |
168 | <constant>GL_INVALID_OPERATION</constant> is generated by <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>\r | |
169 | if no geometry shader is present, transform feedback is active and <parameter>mode</parameter> is not one of the allowed modes.\r | |
170 | </para>\r | |
171 | <para>\r | |
172 | <constant>GL_INVALID_OPERATION</constant> is generated by <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>\r | |
173 | if a geometry shader is present, transform feedback is active and the output primitive type of the geometry shader does not\r | |
174 | match the transform feedback <parameter>primitiveMode</parameter>.\r | |
175 | </para>\r | |
176 | <para>\r | |
177 | <constant>GL_INVALID_OPERATION</constant> is generated by <function>glEndTransformFeedback</function> if any binding\r | |
178 | point used in transform feedback mode does not have a buffer object bound.\r | |
179 | </para>\r | |
180 | <para>\r | |
181 | <constant>GL_INVALID_OPERATION</constant> is generated by <function>glEndTransformFeedback</function> if no binding\r | |
182 | points would be used, either because no program object is active of because the active program object has specified\r | |
183 | no varying variables to record.\r | |
184 | </para>\r | |
185 | </refsect1>\r | |
186 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
187 | <para>\r | |
188 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r | |
189 | This material may be distributed subject to the terms and conditions set forth in \r | |
190 | the Open Publication License, v 1.0, 8 June 1999.\r | |
191 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
192 | </para>\r | |
193 | </refsect1>\r | |
194 | </refentry>\r |