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=
"glGetTransformFeedbackVarying">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glGetTransformFeedbackVarying
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetTransformFeedbackVarying
</refname>
17 <refpurpose>retrieve information about varying variables selected for transform feedback
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glGetTransformFeedbackVarying
</function></funcdef>
23 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>index
</parameter></paramdef>
25 <paramdef>GLsizei
<parameter>bufSize
</parameter></paramdef>
26 <paramdef>GLsizei *
<parameter>length
</parameter></paramdef>
27 <paramdef>GLsizei
<parameter>size
</parameter></paramdef>
28 <paramdef>GLenum *
<parameter>type
</parameter></paramdef>
29 <paramdef>char *
<parameter>name
</parameter></paramdef>
33 <refsect1 id=
"parameters"><title>Parameters
</title>
36 <term><parameter>program
</parameter></term>
39 The name of the target program object.
44 <term><parameter>index
</parameter></term>
47 The index of the varying variable whose information to retrieve.
52 <term><parameter>bufSize
</parameter></term>
55 The maximum number of characters, including the null terminator, that may be written into
<parameter>name
</parameter>.
60 <term><parameter>length
</parameter></term>
63 The address of a variable which will receive the number of characters written into
<parameter>name
</parameter>,
64 excluding the null-terminator. If
<parameter>length
</parameter> is
<constant>NULL
</constant> no length is returned.
69 <term><parameter>size
</parameter></term>
72 The address of a variable that will receive the size of the varying.
77 <term><parameter>type
</parameter></term>
80 The address of a variable that will recieve the type of the varying.
85 <term><parameter>name
</parameter></term>
88 The address of a buffer into which will be written the name of the varying.
94 <refsect1 id=
"description"><title>Description
</title>
96 Information about the set of varying variables in a linked program that will be captured
97 during transform feedback may be retrieved by calling
<function>glGetTransformFeedbackVarying
</function>.
98 <function>glGetTransformFeedbackVarying
</function> provides information about the varying
99 variable selected by
<parameter>index
</parameter>. An
<parameter>index
</parameter> of
0 selects
100 the first varying variable specified in the
<parameter>varyings
</parameter> array passed
101 to
<citerefentry><refentrytitle>glTransformFeedbackVaryings
</refentrytitle></citerefentry>, and
102 an
<parameter>index
</parameter> of
<constant>GL_TRANSFORM_FEEDBACK_VARYINGS-
1</constant> selects
103 the last such variable.
106 The name of the selected varying is returned as a null-terminated string in
107 <parameter>name
</parameter>. The actual number of characters written into
<parameter>name
</parameter>,
108 excluding the null terminator, is returned in
<parameter>length
</parameter>. If
<parameter>length
</parameter>
109 is NULL, no length is returned. The maximum number of characters that may be written into
<parameter>name
</parameter>,
110 including the null terminator, is specified by
<parameter>bufSize
</parameter>.
113 The length of the longest varying name in program is given by
<constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
</constant>,
114 which can be queried with
<citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>.
117 For the selected varying variable, its type is returned into
<parameter>type
</parameter>. The size of
118 the varying is returned into
<parameter>size
</parameter>. The value in
<parameter>size
</parameter> is
119 in units of the type returned in
<parameter>type
</parameter>. The type returned can be any of the
120 scalar, vector, or matrix attribute types returned by
<citerefentry><refentrytitle>glGetActiveAttrib
</refentrytitle></citerefentry>.
121 If an error occurred, the return parameters
<parameter>length
</parameter>,
<parameter>size
</parameter>,
122 <parameter>type
</parameter> and
<parameter>name
</parameter> will be unmodified. This command will return as much
123 information about the varying variables as possible. If no information is available,
<parameter>length
</parameter>
124 will be set to zero and
<parameter>name
</parameter> will be an empty string. This situation could
125 arise if
<function>glGetTransformFeedbackVarying
</function> is called after a failed link.
128 <refsect1 id=
"errors"><title>Errors
</title>
130 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>program
</parameter> is not
131 the name of a program object.
134 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>index
</parameter> is greater or equal to
135 the value of
<constant>GL_TRANSFORM_FEEDBACK_VARYINGS
</constant>.
138 <constant>GL_INVALID_OPERATION
</constant> is generated
<parameter>program
</parameter> has not been linked.
141 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
143 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry> with argument
<constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
</constant>.
146 <refsect1 id=
"seealso"><title>See Also
</title>
148 <citerefentry><refentrytitle>glBeginTransformFeedback
</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>glEndTransformFeedback
</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>glTransformFeedbackVaryings
</refentrytitle></citerefentry>,
151 <citerefentry><refentrytitle>glGetProgram
</refentrytitle></citerefentry>
153 </refsect1> <refsect1 id=
"Copyright"><title>Copyright
</title>
155 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
156 This material may be distributed subject to the terms and conditions set forth in
157 the Open Publication License, v
1.0,
8 June
1999.
158 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.