ef3f5ca2a9f1519d83e9452d1259cd1ec7b1f07e
[clinton/guile-figl.git] / upstream-man-pages / man4 / glTransformFeedbackVaryings.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="glTransformFeedbackVaryings">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glTransformFeedbackVaryings</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glTransformFeedbackVaryings</refname>
17 <refpurpose>specify values to record in transform feedback buffers</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glTransformFeedbackVaryings</function></funcdef>
23 <paramdef>GLuint<parameter>program</parameter></paramdef>
24 <paramdef>GLsizei<parameter>count</parameter></paramdef>
25 <paramdef>const char **<parameter>varyings</parameter></paramdef>
26 <paramdef>GLenum<parameter>bufferMode</parameter></paramdef>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>program</parameter></term>
34 <listitem>
35 <para>
36 The name of the target program object.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>count</parameter></term>
42 <listitem>
43 <para>
44 The number of varying variables used for transform feedback.
45 </para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>varyings</parameter></term>
50 <listitem>
51 <para>
52 An array of <parameter>count</parameter> zero-terminated strings specifying the
53 names of the varying variables to use for transform feedback.
54 </para>
55 </listitem>
56 </varlistentry>
57 <varlistentry>
58 <term><parameter>bufferMode</parameter></term>
59 <listitem>
60 <para>
61 Identifies the mode used to capture the varying variables when transform feedback is active.
62 <parameter>bufferMode</parameter> must be <constant>GL_INTERLEAVED_ATTRIBS</constant> or <constant>GL_SEPARATE_ATTRIBS</constant>.
63 </para>
64 </listitem>
65 </varlistentry>
66 </variablelist>
67 </refsect1>
68 <refsect1 id="description"><title>Description</title>
69 <para>
70 The names of the vertex or geometry shader outputs to be recorded in transform feedback mode
71 are specified using <function>glTransformFeedbackVaryings</function>. When a geometry shader
72 is active, transform feedback records the values of selected geometry shader output variables
73 from the emitted vertices. Otherwise, the values of the selected vertex shader outputs are
74 recorded.
75 </para>
76 <para>
77 The state set by <function>glTranformFeedbackVaryings</function> is stored and takes effect
78 next time <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> is called
79 on <parameter>program</parameter>. When <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
80 is called, <parameter>program</parameter> is linked so that the values of the specified varying variables
81 for the vertices of each primitive generated by the GL are written to a single buffer
82 object if <parameter>bufferMode</parameter> is <constant>GL_INTERLEAVED_ATTRIBS</constant> or multiple
83 buffer objects if <parameter>bufferMode</parameter> is <constant>GL_SEPARATE_ATTRIBS</constant>.
84 </para>
85 <para>
86 In addition to the errors generated by <function>glTransformFeedbackVaryings</function>, the
87 program <parameter>program</parameter> will fail to link if:
88 <itemizedlist>
89 <listitem>
90 <para>
91 The count specified by <function>glTransformFeedbackVaryings</function> is non-zero, but the
92 program object has no vertex or geometry shader.
93 </para>
94 </listitem>
95 <listitem>
96 <para>
97 Any variable name specified in the <parameter>varyings</parameter> array is not declared as an output
98 in the vertex shader (or the geometry shader, if active).
99 </para>
100 </listitem>
101 <listitem>
102 <para>
103 Any two entries in the <parameter>varyings</parameter> array specify the same varying variable.
104 </para>
105 </listitem>
106 <listitem>
107 <para>
108 The total number of components to capture in any varying variable in <parameter>varyings</parameter>
109 is greater than the constant <constant>GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS</constant>
110 and the buffer mode is <constant>GL_SEPARATE_ATTRIBS</constant>.
111 </para>
112 </listitem>
113 <listitem>
114 <para>
115 The total number of components to capture is greater than the constant
116 <constant>GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS</constant> and the buffer
117 mode is <constant>GL_INTERLEAVED_ATTRIBS</constant>.
118 </para>
119 </listitem>
120 </itemizedlist>
121 </para>
122 </refsect1>
123 <refsect1 id="notes"><title>Notes</title>
124 <para>
125 <function>glGetTransformFeedbackVarying</function> is available only if the GL version is 3.0 or greater.
126 </para>
127 </refsect1>
128 <refsect1 id="errors"><title>Errors</title>
129 <para>
130 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not
131 the name of a program object.
132 </para>
133 <para>
134 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufferMode</parameter> is <constant>GL_SEPARATE_ATTRIBS</constant>
135 and <parameter>count</parameter> is greater than the implementation-dependent limit <constant>GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS</constant>.
136 </para>
137 </refsect1>
138 <refsect1 id="associatedgets"><title>Associated Gets</title>
139 <para>
140 <citerefentry><refentrytitle>glGetTransformFeedbackVarying</refentrytitle></citerefentry>
141 </para>
142 </refsect1>
143 <refsect1 id="seealso"><title>See Also</title>
144 <para>
145 <citerefentry><refentrytitle>glBeginTransformFeedback</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>glGetTransformFeedbackVarying</refentrytitle></citerefentry>
148 </para>
149 </refsect1> <refsect1 id="Copyright"><title>Copyright</title>
150 <para>
151 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
152 This material may be distributed subject to the terms and conditions set forth in
153 the Open Publication License, v 1.0, 8 June 1999.
154 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
155 </para>
156 </refsect1>
157 </refentry>