Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetTransformFeedbackVarying</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetTransformFeedbackVarying</refname> | |
17 | <refpurpose>retrieve information about varying variables selected for transform feedback</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
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> | |
30 | </funcprototype> | |
31 | </funcsynopsis> | |
32 | </refsynopsisdiv> | |
33 | <refsect1 id="parameters"><title>Parameters</title> | |
34 | <variablelist> | |
35 | <varlistentry> | |
36 | <term><parameter>program</parameter></term> | |
37 | <listitem> | |
38 | <para> | |
39 | The name of the target program object. | |
40 | </para> | |
41 | </listitem> | |
42 | </varlistentry> | |
43 | <varlistentry> | |
44 | <term><parameter>index</parameter></term> | |
45 | <listitem> | |
46 | <para> | |
47 | The index of the varying variable whose information to retrieve. | |
48 | </para> | |
49 | </listitem> | |
50 | </varlistentry> | |
51 | <varlistentry> | |
52 | <term><parameter>bufSize</parameter></term> | |
53 | <listitem> | |
54 | <para> | |
55 | The maximum number of characters, including the null terminator, that may be written into <parameter>name</parameter>. | |
56 | </para> | |
57 | </listitem> | |
58 | </varlistentry> | |
59 | <varlistentry> | |
60 | <term><parameter>length</parameter></term> | |
61 | <listitem> | |
62 | <para> | |
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. | |
65 | </para> | |
66 | </listitem> | |
67 | </varlistentry> | |
68 | <varlistentry> | |
69 | <term><parameter>size</parameter></term> | |
70 | <listitem> | |
71 | <para> | |
72 | The address of a variable that will receive the size of the varying. | |
73 | </para> | |
74 | </listitem> | |
75 | </varlistentry> | |
76 | <varlistentry> | |
77 | <term><parameter>type</parameter></term> | |
78 | <listitem> | |
79 | <para> | |
80 | The address of a variable that will recieve the type of the varying. | |
81 | </para> | |
82 | </listitem> | |
83 | </varlistentry> | |
84 | <varlistentry> | |
85 | <term><parameter>name</parameter></term> | |
86 | <listitem> | |
87 | <para> | |
88 | The address of a buffer into which will be written the name of the varying. | |
89 | </para> | |
90 | </listitem> | |
91 | </varlistentry> | |
92 | </variablelist> | |
93 | </refsect1> | |
94 | <refsect1 id="description"><title>Description</title> | |
95 | <para> | |
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. | |
104 | </para> | |
105 | <para> | |
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>. | |
111 | </para> | |
112 | <para> | |
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>. | |
115 | </para> | |
116 | <para> | |
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. | |
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>index</parameter> is greater or equal to | |
135 | the value of <constant>GL_TRANSFORM_FEEDBACK_VARYINGS</constant>. | |
136 | </para> | |
137 | <para> | |
138 | <constant>GL_INVALID_OPERATION</constant> is generated <parameter>program</parameter> has not been linked. | |
139 | </para> | |
140 | </refsect1> | |
141 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
142 | <para> | |
143 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> with argument <constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH</constant>. | |
144 | </para> | |
145 | </refsect1> | |
146 | <refsect1 id="seealso"><title>See Also</title> | |
147 | <para> | |
148 | <citerefentry><refentrytitle>glBeginTransformFeedback</refentrytitle></citerefentry>, | |
149 | <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>, | |
150 | <citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>, | |
151 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> | |
152 | </para> | |
153 | </refsect1> <refsect1 id="Copyright"><title>Copyright</title> | |
154 | <para> | |
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>. | |
159 | </para> | |
160 | </refsect1> | |
161 | </refentry> |