Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="glGetProgramInterface">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2012</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>glGetProgramInterface</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glGetProgramInterface</refname>\r | |
17 | <refpurpose>query a property of an interface in a program</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glGetProgramInterfaceiv</function></funcdef>\r | |
23 | <paramdef>GLuint <parameter>program</parameter></paramdef>\r | |
24 | <paramdef>GLenum <parameter>programInterface</parameter></paramdef>\r | |
25 | <paramdef>GLenum <parameter>pname</parameter></paramdef>\r | |
26 | <paramdef>GLint * <parameter>params</parameter></paramdef>\r | |
27 | </funcprototype>\r | |
28 | </funcsynopsis>\r | |
29 | </refsynopsisdiv>\r | |
30 | <refsect1 id="parameters"><title>Parameters</title>\r | |
31 | <variablelist>\r | |
32 | <varlistentry>\r | |
33 | <term><parameter>program</parameter></term>\r | |
34 | <listitem>\r | |
35 | <para>\r | |
36 | The name of a program object whose interface to query.\r | |
37 | </para>\r | |
38 | </listitem>\r | |
39 | </varlistentry>\r | |
40 | <varlistentry>\r | |
41 | <term><parameter>programInterface</parameter></term>\r | |
42 | <listitem>\r | |
43 | <para>\r | |
44 | A token identifying the interface within <parameter>program</parameter> to query.\r | |
45 | </para>\r | |
46 | </listitem>\r | |
47 | </varlistentry>\r | |
48 | <varlistentry>\r | |
49 | <term><parameter>pname</parameter></term>\r | |
50 | <listitem>\r | |
51 | <para>\r | |
52 | The name of the parameter within <parameter>programInterface</parameter> to query.\r | |
53 | </para>\r | |
54 | </listitem>\r | |
55 | </varlistentry>\r | |
56 | <varlistentry>\r | |
57 | <term><parameter>params</parameter></term>\r | |
58 | <listitem>\r | |
59 | <para>\r | |
60 | The address of a variable to retrieve the value of <parameter>pname</parameter> for the program interface.\r | |
61 | </para>\r | |
62 | </listitem>\r | |
63 | </varlistentry>\r | |
64 | </variablelist>\r | |
65 | </refsect1>\r | |
66 | <refsect1 id="description"><title>Description</title>\r | |
67 | <para>\r | |
68 | <function>glGetProgramInterfaceiv</function> queries the property of the interface identifed\r | |
69 | by <parameter>programInterface</parameter> in <parameter>program</parameter>, the property name of\r | |
70 | which is given by <parameter>pname</parameter>.\r | |
71 | </para>\r | |
72 | <para>\r | |
73 | <parameter>program</parameter> must be the name of an existing program object. <parameter>programInterface</parameter>\r | |
74 | is the name of the interface within <parameter>program</parameter> to query and must be one of the following\r | |
75 | values:\r | |
76 | </para>\r | |
77 | <variablelist>\r | |
78 | <varlistentry>\r | |
79 | <term><constant>GL_UNIFORM</constant></term>\r | |
80 | <listitem>\r | |
81 | <para>\r | |
82 | The query is targeted at the set of active uniforms within <parameter>program</parameter>.\r | |
83 | </para>\r | |
84 | </listitem>\r | |
85 | </varlistentry>\r | |
86 | <varlistentry>\r | |
87 | <term><constant>GL_UNIFORM_BLOCK</constant></term>\r | |
88 | <listitem>\r | |
89 | <para>\r | |
90 | The query is targeted at the set of active uniform blocks within <parameter>program</parameter>.\r | |
91 | </para>\r | |
92 | </listitem>\r | |
93 | </varlistentry>\r | |
94 | <varlistentry>\r | |
95 | <term><constant>GL_ATOMIC_COUNTER_BUFFER</constant></term>\r | |
96 | <listitem>\r | |
97 | <para>\r | |
98 | The query is targeted at the set of active atomic counter buffer binding points within <parameter>program</parameter>.\r | |
99 | </para>\r | |
100 | </listitem>\r | |
101 | </varlistentry>\r | |
102 | <varlistentry>\r | |
103 | <term><constant>GL_PROGRAM_INPUT</constant></term>\r | |
104 | <listitem>\r | |
105 | <para>\r | |
106 | The query is targeted at the set of active input variables used by the first shader stage of <parameter>program</parameter>.\r | |
107 | If <parameter>program</parameter> contains multiple shader stages then input variables from any stage other than the first\r | |
108 | will not be enumerated.\r | |
109 | </para>\r | |
110 | </listitem>\r | |
111 | </varlistentry>\r | |
112 | <varlistentry>\r | |
113 | <term><constant>GL_PROGRAM_OUTPUT</constant></term>\r | |
114 | <listitem>\r | |
115 | <para>\r | |
116 | The query is targeted at the set of active output variables produced by the last shader stage of <parameter>program</parameter>.\r | |
117 | If <parameter>program</parameter> contains multiple shader stages then output variables from any stage other than the last\r | |
118 | will not be enumerated.\r | |
119 | </para>\r | |
120 | </listitem>\r | |
121 | </varlistentry>\r | |
122 | <varlistentry>\r | |
123 | <term><constant>GL_VERTEX_SUBROUTINE</constant></term>,\r | |
124 | <term><constant>GL_TESS_CONTROL_SUBROUTINE</constant></term>,\r | |
125 | <term><constant>GL_TESS_EVALUATION_SUBROUTINE</constant></term>,\r | |
126 | <term><constant>GL_GEOMETRY_SUBROUTINE</constant></term>,\r | |
127 | <term><constant>GL_FRAGMENT_SUBROUTINE</constant></term>,\r | |
128 | <term><constant>GL_COMPUTE_SUBROUTINE</constant></term>\r | |
129 | <listitem>\r | |
130 | <para>\r | |
131 | The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation,\r | |
132 | geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.\r | |
133 | </para>\r | |
134 | </listitem>\r | |
135 | </varlistentry>\r | |
136 | <varlistentry>\r | |
137 | <term><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant></term>,\r | |
138 | <term><constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant></term>,\r | |
139 | <term><constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant></term>,\r | |
140 | <term><constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant></term>,\r | |
141 | <term><constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant></term>,\r | |
142 | <term><constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></term>\r | |
143 | <listitem>\r | |
144 | <para>\r | |
145 | The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation,\r | |
146 | geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.\r | |
147 | </para>\r | |
148 | </listitem>\r | |
149 | </varlistentry>\r | |
150 | <varlistentry>\r | |
151 | <term><constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></term>\r | |
152 | <listitem>\r | |
153 | <para>\r | |
154 | The query is targeted at the set of output variables from the last non-fragment stage of <parameter>program</parameter> that would be\r | |
155 | captured if transform feedback were active.\r | |
156 | </para>\r | |
157 | </listitem>\r | |
158 | </varlistentry>\r | |
159 | <varlistentry>\r | |
160 | <term><constant>GL_BUFFER_VARIABLE</constant></term>\r | |
161 | <listitem>\r | |
162 | <para>\r | |
163 | The query is targeted at the set of active buffer variables used by <parameter>program</parameter>.\r | |
164 | </para>\r | |
165 | </listitem>\r | |
166 | </varlistentry>\r | |
167 | <varlistentry>\r | |
168 | <term><constant>GL_SHADER_STORAGE_BLOCK</constant></term>\r | |
169 | <listitem>\r | |
170 | <para>\r | |
171 | The query is targeted at the set of active shader storage blocks used by <parameter>program</parameter>.\r | |
172 | </para>\r | |
173 | </listitem>\r | |
174 | </varlistentry>\r | |
175 | </variablelist>\r | |
176 | <para>\r | |
177 | <parameter>pname</parameter> identifies the property of <parameter>programInterface</parameter>\r | |
178 | to return in <parameter>params</parameter>.\r | |
179 | </para>\r | |
180 | <para>\r | |
181 | If <parameter>pname</parameter> is <constant>GL_ACTIVE_RESOURCES</constant>, the value returned is the number of\r | |
182 | resources in the active resource list for <parameter>programInterface</parameter>. If the list\r | |
183 | of active resources for <parameter>programInterface</parameter> is empty, zero is returned.\r | |
184 | </para>\r | |
185 | <para>\r | |
186 | If <parameter>pname</parameter> is <constant>GL_MAX_NAME_LENGTH</constant>, the value returned is the length of the\r | |
187 | longest active name string for an active resource in <parameter>programInterface</parameter>.\r | |
188 | This length includes an extra character for the null terminator. If the\r | |
189 | list of active resources for <parameter>programInterface</parameter> is empty, zero is\r | |
190 | returned. It is an error to specify <constant>GL_MAX_NAME_LENGTH</constant> when <parameter>programInterface</parameter>\r | |
191 | is <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, as active atomic counter buffer resources are\r | |
192 | not assigned name strings.\r | |
193 | </para>\r | |
194 | <para>\r | |
195 | If <parameter>pname</parameter> is <constant>GL_MAX_NUM_ACTIVE_VARIABLES</constant>, the value returned is the number\r | |
196 | of active variables belonging to the interface block or atomic counter\r | |
197 | buffer resource in <parameter>programInterface</parameter> with the most active variables. If\r | |
198 | the list of active resources for <parameter>programInterface</parameter> is empty, zero is\r | |
199 | returned. When <parameter>pname</parameter> is <constant>GL_MAX_NUM_ACTIVE_VARIABLES</constant>, <parameter>programInterface</parameter>\r | |
200 | must be <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, or <constant>GL_SHADER_STORAGE_BLOCK</constant>.\r | |
201 | </para>\r | |
202 | <para>\r | |
203 | If <parameter>pname</parameter> is <constant>GL_MAX_NUM_COMPATIBLE_SUBROUTINES</constant>, the value returned is the\r | |
204 | number of compatible subroutines belonging to the active subroutine\r | |
205 | uniform in <parameter>programInterface</parameter> with the most compatible subroutines. If\r | |
206 | the list of active resources for <parameter>programInterface</parameter> is empty, zero is\r | |
207 | returned. When <parameter>pname</parameter> is <constant>GL_MAX_NUM_COMPATIBLE_SUBROUTINES</constant>,\r | |
208 | <parameter>programInterface</parameter> must be one of <constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>,\r | |
209 | <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>,\r | |
210 | <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>, <constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, or\r | |
211 | <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant>.\r | |
212 | </para>\r | |
213 | </refsect1>\r | |
214 | <refsect1 id="errors"><title>Errors</title>\r | |
215 | <para>\r | |
216 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>\r | |
217 | is not one of the accepted object types.\r | |
218 | </para>\r | |
219 | <para>\r | |
220 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter>\r | |
221 | is not the name of an existing sync object.\r | |
222 | </para>\r | |
223 | <para>\r | |
224 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is\r | |
225 | zero.\r | |
226 | </para>\r | |
227 | <para>\r | |
228 | If not NULL, <parameter>length</parameter> and <parameter>label</parameter> should be addresses\r | |
229 | to which the client has write access, otherwise undefined behavior, including process termination\r | |
230 | may occur.\r | |
231 | </para>\r | |
232 | </refsect1>\r | |
233 | <refsect1 id="associatedgets"><title>Associated Gets</title>\r | |
234 | <para>\r | |
235 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.\r | |
236 | </para>\r | |
237 | </refsect1>\r | |
238 | <refsect1 id="seealso"><title>See Also</title>\r | |
239 | <para>\r | |
240 | <citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,\r | |
241 | <citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,\r | |
242 | <citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,\r | |
243 | <citerefentry><refentrytitle>glGetObjectLabel</refentrytitle></citerefentry>.\r | |
244 | </para>\r | |
245 | </refsect1>\r | |
246 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
247 | <para>\r | |
248 | Copyright <trademark class="copyright"></trademark> 2012 Khronos Group. \r | |
249 | This material may be distributed subject to the terms and conditions set forth in \r | |
250 | the Open Publication License, v 1.0, 8 June 1999.\r | |
251 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
252 | </para>\r | |
253 | </refsect1>\r | |
254 | </refentry>\r |