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="glGetActiveSubroutineUniform"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetActiveSubroutineUniform</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetActiveSubroutineUniform</refname> | |
17 | <refpurpose>query a property of an active shader subroutine uniform</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetActiveSubroutineUniformiv</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>GLenum <parameter>pname</parameter></paramdef> | |
27 | <paramdef>GLint *<parameter>values</parameter></paramdef> | |
28 | </funcprototype> | |
29 | </funcsynopsis> | |
30 | </refsynopsisdiv> | |
31 | <!-- eqn: ignoring delim $$ --> | |
32 | <refsect1 id="parameters"><title>Parameters</title> | |
33 | <variablelist> | |
34 | <varlistentry> | |
35 | <term><parameter>program</parameter></term> | |
36 | <listitem> | |
37 | <para> | |
38 | Specifies the name of the program containing the subroutine. | |
39 | </para> | |
40 | </listitem> | |
41 | </varlistentry> | |
42 | <varlistentry> | |
43 | <term><parameter>shadertype</parameter></term> | |
44 | <listitem> | |
45 | <para> | |
46 | Specifies the shader stage from which to query for the subroutine parameter. <parameter>shadertype</parameter> | |
47 | must be one of <constant>GL_VERTEX_SHADER</constant>, <constant>GL_TESS_CONTROL_SHADER</constant>, | |
48 | <constant>GL_TESS_EVALUATION_SHADER</constant>, <constant>GL_GEOMETRY_SHADER</constant> or | |
49 | <constant>GL_FRAGMENT_SHADER</constant>. | |
50 | </para> | |
51 | </listitem> | |
52 | </varlistentry> | |
53 | <varlistentry> | |
54 | <term><parameter>index</parameter></term> | |
55 | <listitem> | |
56 | <para> | |
57 | Specifies the index of the shader subroutine uniform. | |
58 | </para> | |
59 | </listitem> | |
60 | </varlistentry> | |
61 | <varlistentry> | |
62 | <term><parameter>pname</parameter></term> | |
63 | <listitem> | |
64 | <para> | |
65 | Specifies the parameter of the shader subroutine uniform to query. <parameter>pname</parameter> | |
66 | must be <constant>GL_NUM_COMPATIBLE_SUBROUTINES</constant>, <constant>GL_COMPATIBLE_SUBROUTINES</constant>, | |
67 | <constant>GL_UNIFORM_SIZE</constant> or <constant>GL_UNIFORM_NAME_LENGTH</constant>. | |
68 | </para> | |
69 | </listitem> | |
70 | </varlistentry> | |
71 | <varlistentry> | |
72 | <term><parameter>values</parameter></term> | |
73 | <listitem> | |
74 | <para> | |
75 | Specifies the address of a into which the queried value or values will be placed. | |
76 | </para> | |
77 | </listitem> | |
78 | </varlistentry> | |
79 | </variablelist> | |
80 | </refsect1> | |
81 | <refsect1 id="description"><title>Description</title> | |
82 | <para> | |
83 | <function>glGetActiveSubroutineUniform</function> queries a parameter of an active shader subroutine uniform. | |
84 | <parameter>program</parameter> contains the name of the program containing the uniform. <parameter>shadertype</parameter> | |
85 | specifies the stage which which the uniform location, given by <parameter>index</parameter>, is valid. <parameter>index</parameter> | |
86 | must be between zero and the value of <constant>GL_ACTIVE_SUBROUTINE_UNIFORMS</constant> minus one for the | |
87 | shader stage. | |
88 | </para> | |
89 | <para> | |
90 | If <parameter>pname</parameter> is <constant>GL_NUM_COMPATIBLE_SUBROUTINES</constant>, a single integer indicating the number | |
91 | of subroutines that can be assigned to the uniform is returned in <parameter>values</parameter>. | |
92 | </para> | |
93 | <para> | |
94 | If <parameter>pname</parameter> is <constant>GL_COMPATIBLE_SUBROUTINES</constant>, an array of integers is returned in | |
95 | <parameter>values</parameter>, with each integer specifying the index of an active subroutine that can be assigned to | |
96 | the selected subroutine uniform. The number of integers returned is the same as the value returned for | |
97 | <constant>GL_NUM_COMPATIBLE_SUBROUTINES</constant>. | |
98 | </para> | |
99 | <para> | |
100 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_SIZE</constant>, a single integer is returned in <parameter>values</parameter>. | |
101 | If the selected subroutine uniform is an array, the declared size of the array is returned; otherwise, one is returned. | |
102 | </para> | |
103 | <para> | |
104 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_NAME_LENGTH</constant>, a single integer specifying the length of | |
105 | the subroutine uniform name (including the terminating null character) is returned in <parameter>values</parameter>. | |
106 | </para> | |
107 | </refsect1> | |
108 | <refsect1 id="errors"><title>Errors</title> | |
109 | <para> | |
110 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>shadertype</parameter> or <parameter>pname</parameter> | |
111 | is not one of the accepted values. | |
112 | </para> | |
113 | <para> | |
114 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater than or equal to | |
115 | the value of <constant>GL_ACTIVE_SUBROUTINES</constant>. | |
116 | </para> | |
117 | <para> | |
118 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of an | |
119 | existing program object. | |
120 | </para> | |
121 | </refsect1> | |
122 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
123 | <para> | |
124 | <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_SUBROUTINE_UNIFORMS</constant> | |
125 | </para> | |
126 | </refsect1> | |
127 | <refsect1 id="seealso"><title>See Also</title> | |
128 | <para> | |
129 | <citerefentry><refentrytitle>glGetSubroutineIndex</refentrytitle></citerefentry>, | |
130 | <citerefentry><refentrytitle>glGetActiveSubroutineUniformName</refentrytitle></citerefentry>, | |
131 | <citerefentry><refentrytitle>glGetProgramStage</refentrytitle></citerefentry> | |
132 | </para> | |
133 | </refsect1> | |
134 | <refsect1 id="Copyright"><title>Copyright</title> | |
135 | <para> | |
136 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. | |
137 | This material may be distributed subject to the terms and conditions set forth in | |
138 | the Open Publication License, v 1.0, 8 June 1999. | |
139 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
140 | </para> | |
141 | </refsect1> | |
142 | </refentry> |