2014-03-28 19:06:55 +00:00
|
|
|
<!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="glTransformFeedbackVaryings">
|
|
|
|
<info>
|
2013-11-03 11:43:50 +00:00
|
|
|
<copyright>
|
|
|
|
<year>2010-2013</year>
|
|
|
|
<holder>Khronos Group</holder>
|
|
|
|
</copyright>
|
2014-03-28 19:06:55 +00:00
|
|
|
</info>
|
2013-10-10 23:58:54 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>glTransformFeedbackVaryings</refentrytitle>
|
|
|
|
<manvolnum>3G</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>glTransformFeedbackVaryings</refname>
|
|
|
|
<refpurpose>specify values to record in transform feedback buffers</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv><title>C Specification</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>void <function>glTransformFeedbackVaryings</function></funcdef>
|
|
|
|
<paramdef>GLuint<parameter>program</parameter></paramdef>
|
|
|
|
<paramdef>GLsizei<parameter>count</parameter></paramdef>
|
|
|
|
<paramdef>const char **<parameter>varyings</parameter></paramdef>
|
|
|
|
<paramdef>GLenum<parameter>bufferMode</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="parameters"><title>Parameters</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>program</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the target program object.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>count</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The number of varying variables used for transform feedback.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>varyings</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
An array of <parameter>count</parameter> zero-terminated strings specifying the
|
|
|
|
names of the varying variables to use for transform feedback.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>bufferMode</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Identifies the mode used to capture the varying variables when transform feedback is active.
|
|
|
|
<parameter>bufferMode</parameter> must be <constant>GL_INTERLEAVED_ATTRIBS</constant> or <constant>GL_SEPARATE_ATTRIBS</constant>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="description"><title>Description</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
The names of the vertex or geometry shader outputs to be recorded in transform feedback mode
|
|
|
|
are specified using <function>glTransformFeedbackVaryings</function>. When a geometry shader
|
|
|
|
is active, transform feedback records the values of selected geometry shader output variables
|
|
|
|
from the emitted vertices. Otherwise, the values of the selected vertex shader outputs are
|
|
|
|
recorded.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The state set by <function>glTranformFeedbackVaryings</function> is stored and takes effect
|
|
|
|
next time <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> is called
|
|
|
|
on <parameter>program</parameter>. When <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
|
|
|
is called, <parameter>program</parameter> is linked so that the values of the specified varying variables
|
|
|
|
for the vertices of each primitive generated by the GL are written to a single buffer
|
|
|
|
object if <parameter>bufferMode</parameter> is <constant>GL_INTERLEAVED_ATTRIBS</constant> or multiple
|
|
|
|
buffer objects if <parameter>bufferMode</parameter> is <constant>GL_SEPARATE_ATTRIBS</constant>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
In addition to the errors generated by <function>glTransformFeedbackVaryings</function>, the
|
|
|
|
program <parameter>program</parameter> will fail to link if:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The count specified by <function>glTransformFeedbackVaryings</function> is non-zero, but the
|
|
|
|
program object has no vertex or geometry shader.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Any variable name specified in the <parameter>varyings</parameter> array is not declared as an output
|
|
|
|
in the vertex shader (or the geometry shader, if active).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Any two entries in the <parameter>varyings</parameter> array specify the same varying variable.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The total number of components to capture in any varying variable in <parameter>varyings</parameter>
|
|
|
|
is greater than the constant <constant>GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS</constant>
|
|
|
|
and the buffer mode is <constant>GL_SEPARATE_ATTRIBS</constant>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The total number of components to capture is greater than the constant
|
|
|
|
<constant>GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS</constant> and the buffer
|
|
|
|
mode is <constant>GL_INTERLEAVED_ATTRIBS</constant>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="notes"><title>Notes</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<function>glGetTransformFeedbackVarying</function> is available only if the GL version is 3.0 or greater.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="errors"><title>Errors</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<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>bufferMode</parameter> is <constant>GL_SEPARATE_ATTRIBS</constant>
|
|
|
|
and <parameter>count</parameter> is greater than the implementation-dependent limit <constant>GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS</constant>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="associatedgets"><title>Associated Gets</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>glGetTransformFeedbackVarying</refentrytitle></citerefentry>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="seealso"><title>See Also</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>glBeginTransformFeedback</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glGetTransformFeedbackVarying</refentrytitle></citerefentry>
|
|
|
|
</para>
|
2014-03-28 19:06:55 +00:00
|
|
|
</refsect1> <refsect1 xml:id="Copyright"><title>Copyright</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
2014-03-28 19:06:55 +00:00
|
|
|
Copyright <trademark class="copyright"/> 2010-2013 Khronos Group.
|
2013-11-03 11:43:50 +00:00
|
|
|
This material may be distributed subject to the terms and conditions set forth in
|
2013-10-10 23:58:54 +00:00
|
|
|
the Open Publication License, v 1.0, 8 June 1999.
|
2014-03-28 19:06:55 +00:00
|
|
|
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
|
2013-10-10 23:58:54 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|