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="glGetTransformFeedbackVarying">\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>glGetTransformFeedbackVarying</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glGetTransformFeedbackVarying</refname>\r | |
17 | <refpurpose>retrieve information about varying variables selected for transform feedback</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glGetTransformFeedbackVarying</function></funcdef>\r | |
23 | <paramdef>GLuint<parameter>program</parameter></paramdef>\r | |
24 | <paramdef>GLuint<parameter>index</parameter></paramdef>\r | |
25 | <paramdef>GLsizei<parameter>bufSize</parameter></paramdef>\r | |
26 | <paramdef>GLsizei *<parameter>length</parameter></paramdef>\r | |
f37e7e3d | 27 | <paramdef>GLsizei<parameter>size</parameter></paramdef>\r |
7faf1d71 AW |
28 | <paramdef>GLenum *<parameter>type</parameter></paramdef>\r |
29 | <paramdef>char *<parameter>name</parameter></paramdef>\r | |
30 | </funcprototype>\r | |
31 | </funcsynopsis>\r | |
32 | </refsynopsisdiv>\r | |
33 | <refsect1 id="parameters"><title>Parameters</title>\r | |
34 | <variablelist>\r | |
35 | <varlistentry>\r | |
36 | <term><parameter>program</parameter></term>\r | |
37 | <listitem>\r | |
38 | <para>\r | |
39 | The name of the target program object.\r | |
40 | </para>\r | |
41 | </listitem>\r | |
42 | </varlistentry>\r | |
43 | <varlistentry>\r | |
44 | <term><parameter>index</parameter></term>\r | |
45 | <listitem>\r | |
46 | <para>\r | |
47 | The index of the varying variable whose information to retrieve.\r | |
48 | </para>\r | |
49 | </listitem>\r | |
50 | </varlistentry>\r | |
51 | <varlistentry>\r | |
52 | <term><parameter>bufSize</parameter></term>\r | |
53 | <listitem>\r | |
54 | <para>\r | |
55 | The maximum number of characters, including the null terminator, that may be written into <parameter>name</parameter>.\r | |
56 | </para>\r | |
57 | </listitem>\r | |
58 | </varlistentry>\r | |
59 | <varlistentry>\r | |
60 | <term><parameter>length</parameter></term>\r | |
61 | <listitem>\r | |
62 | <para>\r | |
63 | The address of a variable which will receive the number of characters written into <parameter>name</parameter>,\r | |
64 | excluding the null-terminator. If <parameter>length</parameter> is <constant>NULL</constant> no length is returned.\r | |
65 | </para>\r | |
66 | </listitem>\r | |
67 | </varlistentry>\r | |
68 | <varlistentry>\r | |
69 | <term><parameter>size</parameter></term>\r | |
70 | <listitem>\r | |
71 | <para>\r | |
72 | The address of a variable that will receive the size of the varying.\r | |
73 | </para>\r | |
74 | </listitem>\r | |
75 | </varlistentry>\r | |
76 | <varlistentry>\r | |
77 | <term><parameter>type</parameter></term>\r | |
78 | <listitem>\r | |
79 | <para>\r | |
80 | The address of a variable that will recieve the type of the varying.\r | |
81 | </para>\r | |
82 | </listitem>\r | |
83 | </varlistentry>\r | |
84 | <varlistentry>\r | |
85 | <term><parameter>name</parameter></term>\r | |
86 | <listitem>\r | |
87 | <para>\r | |
88 | The address of a buffer into which will be written the name of the varying.\r | |
89 | </para>\r | |
90 | </listitem>\r | |
91 | </varlistentry>\r | |
92 | </variablelist>\r | |
93 | </refsect1>\r | |
94 | <refsect1 id="description"><title>Description</title>\r | |
95 | <para>\r | |
96 | Information about the set of varying variables in a linked program that will be captured\r | |
97 | during transform feedback may be retrieved by calling <function>glGetTransformFeedbackVarying</function>.\r | |
98 | <function>glGetTransformFeedbackVarying</function> provides information about the varying\r | |
99 | variable selected by <parameter>index</parameter>. An <parameter>index</parameter> of 0 selects\r | |
100 | the first varying variable specified in the <parameter>varyings</parameter> array passed\r | |
101 | to <citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>, and\r | |
f37e7e3d | 102 | an <parameter>index</parameter> of <constant>GL_TRANSFORM_FEEDBACK_VARYINGS-1</constant> selects\r |
7faf1d71 AW |
103 | the last such variable.\r |
104 | </para>\r | |
105 | <para>\r | |
106 | The name of the selected varying is returned as a null-terminated string in\r | |
107 | <parameter>name</parameter>. The actual number of characters written into <parameter>name</parameter>,\r | |
108 | excluding the null terminator, is returned in <parameter>length</parameter>. If <parameter>length</parameter>\r | |
109 | is NULL, no length is returned. The maximum number of characters that may be written into <parameter>name</parameter>,\r | |
110 | including the null terminator, is specified by <parameter>bufSize</parameter>.\r | |
111 | </para>\r | |
112 | <para>\r | |
113 | The length of the longest varying name in program is given by <constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH</constant>,\r | |
114 | which can be queried with <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.\r | |
115 | </para>\r | |
116 | <para>\r | |
117 | For the selected varying variable, its type is returned into <parameter>type</parameter>. The size of\r | |
118 | the varying is returned into <parameter>size</parameter>. The value in <parameter>size</parameter> is\r | |
119 | in units of the type returned in <parameter>type</parameter>. The type returned can be any of the\r | |
120 | scalar, vector, or matrix attribute types returned by <citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>.\r | |
121 | If an error occurred, the return parameters <parameter>length</parameter>, <parameter>size</parameter>,\r | |
122 | <parameter>type</parameter> and <parameter>name</parameter> will be unmodified. This command will return as much\r | |
123 | information about the varying variables as possible. If no information is available, <parameter>length</parameter>\r | |
124 | will be set to zero and <parameter>name</parameter> will be an empty string. This situation could\r | |
125 | arise if <function>glGetTransformFeedbackVarying</function> is called after a failed link.\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>index</parameter> is greater or equal to\r | |
135 | the value of <constant>GL_TRANSFORM_FEEDBACK_VARYINGS</constant>.\r | |
136 | </para>\r | |
137 | <para>\r | |
138 | <constant>GL_INVALID_OPERATION</constant> is generated <parameter>program</parameter> has not been linked.\r | |
139 | </para>\r | |
140 | </refsect1>\r | |
141 | <refsect1 id="associatedgets"><title>Associated Gets</title>\r | |
142 | <para>\r | |
143 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> with argument <constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH</constant>.\r | |
144 | </para>\r | |
145 | </refsect1>\r | |
146 | <refsect1 id="seealso"><title>See Also</title>\r | |
147 | <para>\r | |
148 | <citerefentry><refentrytitle>glBeginTransformFeedback</refentrytitle></citerefentry>,\r | |
149 | <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>,\r | |
150 | <citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>,\r | |
151 | <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>\r | |
152 | </para>\r | |
153 | </refsect1> <refsect1 id="Copyright"><title>Copyright</title>\r | |
154 | <para>\r | |
f37e7e3d | 155 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r |
7faf1d71 AW |
156 | This material may be distributed subject to the terms and conditions set forth in \r |
157 | the Open Publication License, v 1.0, 8 June 1999.\r | |
158 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
159 | </para>\r | |
160 | </refsect1>\r | |
161 | </refentry>\r |