Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetActiveSubroutineName</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetActiveSubroutineName</refname> | |
17 | <refpurpose>query the name of an active shader subroutine</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
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> | |
29 | </funcprototype> | |
30 | </funcsynopsis> | |
31 | </refsynopsisdiv> | |
32 | <!-- eqn: ignoring delim $$ --> | |
33 | <refsect1 id="parameters"><title>Parameters</title> | |
34 | <variablelist> | |
35 | <varlistentry> | |
36 | <term><parameter>program</parameter></term> | |
37 | <listitem> | |
38 | <para> | |
39 | Specifies the name of the program containing the subroutine. | |
40 | </para> | |
41 | </listitem> | |
42 | </varlistentry> | |
43 | <varlistentry> | |
44 | <term><parameter>shadertype</parameter></term> | |
45 | <listitem> | |
46 | <para> | |
47 | Specifies the shader stage from which to query the subroutine name. | |
48 | </para> | |
49 | </listitem> | |
50 | </varlistentry> | |
51 | <varlistentry> | |
52 | <term><parameter>index</parameter></term> | |
53 | <listitem> | |
54 | <para> | |
55 | Specifies the index of the shader subroutine uniform. | |
56 | </para> | |
57 | </listitem> | |
58 | </varlistentry> | |
59 | <varlistentry> | |
60 | <term><parameter>bufsize</parameter></term> | |
61 | <listitem> | |
62 | <para> | |
63 | Specifies the size of the buffer whose address is given in <parameter>name</parameter>. | |
64 | </para> | |
65 | </listitem> | |
66 | </varlistentry> | |
67 | <varlistentry> | |
68 | <term><parameter>length</parameter></term> | |
69 | <listitem> | |
70 | <para> | |
71 | Specifies the address of a variable which is to receive the length of the shader subroutine uniform name. | |
72 | </para> | |
73 | </listitem> | |
74 | </varlistentry> | |
75 | <varlistentry> | |
76 | <term><parameter>name</parameter></term> | |
77 | <listitem> | |
78 | <para> | |
79 | Specifies the address of an array into which the name of the shader subroutine uniform will be written. | |
80 | </para> | |
81 | </listitem> | |
82 | </varlistentry> | |
83 | </variablelist> | |
84 | </refsect1> | |
85 | <refsect1 id="description"><title>Description</title> | |
86 | <para> | |
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. | |
91 | </para> | |
92 | <para> | |
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>. | |
98 | </para> | |
99 | </refsect1> | |
100 | <refsect1 id="errors"><title>Errors</title> | |
101 | <para> | |
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>. | |
104 | </para> | |
105 | <para> | |
106 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of an | |
107 | existing program object. | |
108 | </para> | |
109 | </refsect1> | |
110 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
111 | <para> | |
112 | <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH</constant> | |
113 | </para> | |
114 | </refsect1> | |
115 | <refsect1 id="seealso"><title>See Also</title> | |
116 | <para> | |
117 | <citerefentry><refentrytitle>glGetSubroutineIndex</refentrytitle></citerefentry>, | |
118 | <citerefentry><refentrytitle>glGetActiveSubroutineUniform</refentrytitle></citerefentry>, | |
119 | <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> | |
120 | </para> | |
121 | </refsect1> | |
122 | <refsect1 id="Copyright"><title>Copyright</title> | |
123 | <para> | |
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>. | |
128 | </para> | |
129 | </refsect1> | |
130 | </refentry> |