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