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=
"glGetActiveSubroutineName">
9 <holder>Khronos Group.
</holder>
12 <refentrytitle>glGetActiveSubroutineName
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetActiveSubroutineName
</refname>
17 <refpurpose>query the name of an active shader subroutine
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glGetActiveSubroutineName
</function></funcdef>
23 <paramdef>GLuint
<parameter>program
</parameter></paramdef>
24 <paramdef>GLenum
<parameter>shadertype
</parameter></paramdef>
25 <paramdef>GLuint
<parameter>index
</parameter></paramdef>
26 <paramdef>GLsizei
<parameter>bufsize
</parameter></paramdef>
27 <paramdef>GLsizei *
<parameter>length
</parameter></paramdef>
28 <paramdef>GLchar *
<parameter>name
</parameter></paramdef>
32 <!-- eqn: ignoring delim $$ -->
33 <refsect1 id=
"parameters"><title>Parameters
</title>
36 <term><parameter>program
</parameter></term>
39 Specifies the name of the program containing the subroutine.
44 <term><parameter>shadertype
</parameter></term>
47 Specifies the shader stage from which to query the subroutine name.
52 <term><parameter>index
</parameter></term>
55 Specifies the index of the shader subroutine uniform.
60 <term><parameter>bufsize
</parameter></term>
63 Specifies the size of the buffer whose address is given in
<parameter>name
</parameter>.
68 <term><parameter>length
</parameter></term>
71 Specifies the address of a variable which is to receive the length of the shader subroutine uniform name.
76 <term><parameter>name
</parameter></term>
79 Specifies the address of an array into which the name of the shader subroutine uniform will be written.
85 <refsect1 id=
"description"><title>Description
</title>
87 <function>glGetActiveSubroutineName
</function> queries the name of an active shader subroutine uniform from the
88 program object given in
<parameter>program
</parameter>.
<parameter>index
</parameter> specifies the index of
89 the shader subroutine uniform within the shader stage given by
<parameter>stage
</parameter>, and must between
90 zero and the value of
<constant>GL_ACTIVE_SUBROUTINES
</constant> minus one for the shader stage.
93 The name of the selected subroutine is returned as a null-terminated string in
<parameter>name
</parameter>. The
94 actual number of characters written into
<parameter>name
</parameter>, not including the null-terminator, is
95 is returned in
<parameter>length
</parameter>. If
<parameter>length
</parameter> is
<constant>NULL
</constant>,
96 no length is returned. The maximum number of characters that may be written into
<parameter>name
</parameter>,
97 including the null-terminator, is given in
<parameter>bufsize
</parameter>.
100 <refsect1 id=
"errors"><title>Errors
</title>
102 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>index
</parameter> is greater than or equal to
103 the value of
<constant>GL_ACTIVE_SUBROUTINES
</constant>.
106 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>program
</parameter> is not the name of an
107 existing program object.
110 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
112 <citerefentry><refentrytitle>glGetProgramStage
</refentrytitle></citerefentry> with argument
<constant>GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH
</constant>
115 <refsect1 id=
"seealso"><title>See Also
</title>
117 <citerefentry><refentrytitle>glGetSubroutineIndex
</refentrytitle></citerefentry>,
118 <citerefentry><refentrytitle>glGetActiveSubroutineUniform
</refentrytitle></citerefentry>,
119 <citerefentry><refentrytitle>glGetProgramStage
</refentrytitle></citerefentry>
122 <refsect1 id=
"Copyright"><title>Copyright
</title>
124 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
125 This material may be distributed subject to the terms and conditions set forth in
126 the Open Publication License, v
1.0,
8 June
1999.
127 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.