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=
"glGetFragDataIndex">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glGetFragDataIndex
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetFragDataIndex
</refname>
17 <refpurpose>query the bindings of color indices to user-defined varying out variables
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>GLint
<function>glGetFragDataIndex
</function></funcdef>
23 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
24 <paramdef>const char *
<parameter>name
</parameter></paramdef>
28 <refsect1 id=
"parameters"><title>Parameters
</title>
31 <term><parameter>program
</parameter></term>
34 The name of the program containing varying out variable whose binding to query
39 <term><parameter>name
</parameter></term>
42 The name of the user-defined varying out variable whose index to query
48 <refsect1 id=
"description"><title>Description
</title>
50 <function>glGetFragDataIndex
</function> returns the index of the fragment color to which the variable
<parameter>name
</parameter>
51 was bound when the program object
<parameter>program
</parameter> was last linked. If
<parameter>name
</parameter> is not a varying out
52 variable of
<parameter>program
</parameter>, or if an error occurs, -
1 will be returned.
55 <refsect1 id=
"notes"><title>Notes
</title>
57 <function>glGetFragDataIndex
</function> is available only if the GL version is
3.3 or greater.
60 <refsect1 id=
"errors"><title>Errors
</title>
62 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>program
</parameter> is not the name of a program object.
65 <refsect1 id=
"seealso"><title>See Also
</title>
67 <citerefentry><refentrytitle>glCreateProgram
</refentrytitle></citerefentry>,
68 <citerefentry><refentrytitle>glBindFragDataLocation
</refentrytitle></citerefentry>,
69 <citerefentry><refentrytitle>glBindFragDataLocationIndexed
</refentrytitle></citerefentry>,
70 <citerefentry><refentrytitle>glGetFragDataLocation
</refentrytitle></citerefentry>
73 <refsect1 id=
"Copyright"><title>Copyright
</title>
75 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
76 This material may be distributed subject to the terms and conditions set forth in
77 the Open Publication License, v
1.0,
8 June
1999.
78 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.