1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>
<!-- Converted by db4-upgrade version 1.1 -->
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glGetTransformFeedbackVarying">
<info>
<copyright>
<year>2010-2014</year>
<holder>Khronos Group</holder>
</copyright>
</info>
<refmeta>
<refentrytitle>glGetTransformFeedbackVarying</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glGetTransformFeedbackVarying</refname>
<refpurpose>retrieve information about varying variables selected for transform feedback</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGetTransformFeedbackVarying</function></funcdef>
<paramdef>GLuint<parameter>program</parameter></paramdef>
<paramdef>GLuint<parameter>index</parameter></paramdef>
<paramdef>GLsizei<parameter>bufSize</parameter></paramdef>
<paramdef>GLsizei *<parameter>length</parameter></paramdef>
<paramdef>GLsizei *<parameter>size</parameter></paramdef>
<paramdef>GLenum *<parameter>type</parameter></paramdef>
<paramdef>char *<parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 xml:id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>program</parameter></term>
<listitem>
<para>
The name of the target program object.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>index</parameter></term>
<listitem>
<para>
The index of the varying variable whose information to retrieve.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>bufSize</parameter></term>
<listitem>
<para>
The maximum number of characters, including the null terminator, that may be written into <parameter>name</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>length</parameter></term>
<listitem>
<para>
The address of a variable which will receive the number of characters written into <parameter>name</parameter>,
excluding the null-terminator. If <parameter>length</parameter> is <constant>NULL</constant> no length is returned.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>size</parameter></term>
<listitem>
<para>
The address of a variable that will receive the size of the varying.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type</parameter></term>
<listitem>
<para>
The address of a variable that will recieve the type of the varying.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The address of a buffer into which will be written the name of the varying.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 xml:id="description"><title>Description</title>
<para>
Information about the set of varying variables in a linked program that will be captured
during transform feedback may be retrieved by calling <function>glGetTransformFeedbackVarying</function>.
<function>glGetTransformFeedbackVarying</function> provides information about the varying
variable selected by <parameter>index</parameter>. An <parameter>index</parameter> of 0 selects
the first varying variable specified in the <parameter>varyings</parameter> array passed
to <citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>, and
an <parameter>index</parameter> of the value of
<constant>GL_TRANSFORM_FEEDBACK_VARYINGS</constant> minus one selects
the last such variable.
</para>
<para>
The name of the selected varying is returned as a null-terminated string in
<parameter>name</parameter>. The actual number of characters written into <parameter>name</parameter>,
excluding the null terminator, is returned in <parameter>length</parameter>. If <parameter>length</parameter>
is NULL, no length is returned. The maximum number of characters that may be written into <parameter>name</parameter>,
including the null terminator, is specified by <parameter>bufSize</parameter>.
</para>
<para>
The length of the longest varying name in program is given by <constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH</constant>,
which can be queried with <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.
</para>
<para>
For the selected varying variable, its type is returned into <parameter>type</parameter>. The size of
the varying is returned into <parameter>size</parameter>. The value in <parameter>size</parameter> is
in units of the type returned in <parameter>type</parameter>. The type returned can be any of the
scalar, vector, or matrix attribute types returned by <citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>.
If an error occurred, the return parameters <parameter>length</parameter>, <parameter>size</parameter>,
<parameter>type</parameter> and <parameter>name</parameter> will be unmodified. This command will return as much
information about the varying variables as possible. If no information is available, <parameter>length</parameter>
will be set to zero and <parameter>name</parameter> will be an empty string. This situation could
arise if <function>glGetTransformFeedbackVarying</function> is called after a failed link.
</para>
</refsect1>
<refsect1 xml:id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not
the name of a program object.
</para>
<para>
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater or equal to
the value of <constant>GL_TRANSFORM_FEEDBACK_VARYINGS</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated <parameter>program</parameter> has not been linked.
</para>
</refsect1>
<refsect1 xml:id="associatedgets"><title>Associated Gets</title>
<para>
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> with argument <constant>GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH</constant>.
</para>
</refsect1>
<refsect1 xml:id="versions"><title>Version Support</title>
<informaltable>
<tgroup cols="13" align="left">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
<tbody>
<row>
<entry><function>glGetTransformFeedbackVarying</function></entry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='30']/*)"/>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 xml:id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glBeginTransformFeedback</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
</para>
</refsect1> <refsect1 xml:id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"/> 2010-2014 Khronos Group.
This material may be distributed subject to the terms and conditions set forth in
the Open Publication License, v 1.0, 8 June 1999.
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
</para>
</refsect1>
</refentry>
|