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="glGetActiveUniformsiv"> | |
5 | <refmeta> | |
6 | <refentrytitle>glGetActiveUniformsiv</refentrytitle> | |
7 | <manvolnum>3G</manvolnum> | |
8 | </refmeta> | |
9 | <refnamediv> | |
10 | <refname>glGetActiveUniformsiv</refname> | |
11 | <refpurpose>Returns information about several active uniform variables for the specified program object</refpurpose> | |
12 | </refnamediv> | |
13 | <refsynopsisdiv><title>C Specification</title> | |
14 | <funcsynopsis> | |
15 | <funcprototype> | |
16 | <funcdef>void <function>glGetActiveUniformsiv</function></funcdef> | |
17 | <paramdef>GLuint <parameter>program</parameter></paramdef> | |
18 | <paramdef>GLsizei <parameter>uniformCount</parameter></paramdef> | |
19 | <paramdef>const GLuint *<parameter>uniformIndices</parameter></paramdef> | |
20 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
21 | <paramdef>GLint *<parameter>params</parameter></paramdef> | |
22 | </funcprototype> | |
23 | </funcsynopsis> | |
24 | </refsynopsisdiv> | |
25 | <refsect1 id="parameters"><title>Parameters</title> | |
26 | <variablelist> | |
27 | <varlistentry> | |
28 | <term><parameter>program</parameter></term> | |
29 | <listitem> | |
30 | <para>Specifies the program object to be queried.</para> | |
31 | </listitem> | |
32 | </varlistentry> | |
33 | <varlistentry> | |
34 | <term><parameter>uniformCount</parameter></term> | |
35 | <listitem> | |
36 | <para>Specifies both the number of elements in the array of indices <parameter>uniformIndices</parameter> and the | |
37 | number of parameters written to <parameter>params</parameter> upon successful return.</para> | |
38 | </listitem> | |
39 | </varlistentry> | |
40 | <varlistentry> | |
41 | <term><parameter>uniformIndices</parameter></term> | |
42 | <listitem> | |
43 | <para>Specifies the address of an array of <parameter>uniformCount</parameter> integers containing the indices of | |
44 | uniforms within <parameter>program</parameter> whose parameter <parameter>pname</parameter> pname.</para> | |
45 | </listitem> | |
46 | </varlistentry> | |
47 | <varlistentry> | |
48 | <term><parameter>pname</parameter></term> | |
49 | <listitem> | |
50 | <para>Specifies the property of the each uniform in <parameter>uniformIndices</parameter> that should be | |
51 | written into the corresponding element of <parameter>params</parameter>.</para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><parameter>params</parameter></term> | |
56 | <listitem> | |
57 | <para>Specifies the address of an array of <parameter>uniformCount</parameter> integers which are to | |
58 | receive the value of <parameter>pname</parameter> for each uniform in <parameter>uniformIndices</parameter>.</para> | |
59 | </listitem> | |
60 | </varlistentry> | |
61 | </variablelist> | |
62 | </refsect1> | |
63 | <refsect1 id="description"><title>Description</title> | |
64 | <para> | |
65 | <function>glGetActiveUniformsiv</function> queries the value of the parameter named <parameter>pname</parameter> | |
66 | for each of the uniforms within <parameter>program</parameter> whose indices are specified in the array of | |
67 | <parameter>uniformCount</parameter> unsigned integers <parameter>uniformIndices</parameter>. Upon success, | |
68 | the value of the parameter for each uniform is written into the corresponding entry in the array whose | |
69 | address is given in <parameter>params</parameter>. If an error is generated, nothing is written into | |
70 | <parameter>params</parameter>. | |
71 | </para> | |
72 | <para> | |
73 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_TYPE</constant>, then an array identifying the types | |
74 | of uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is returned. The | |
75 | returned types can be any of the values from the following table: | |
76 | <informaltable frame="topbot"> | |
77 | <tgroup cols="2" align="left"> | |
78 | <colspec colwidth="1.1*" /> | |
79 | <colspec colwidth="1*" /> | |
80 | <thead> | |
81 | <row> | |
82 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
83 | Returned Symbolic Contant | |
84 | </emphasis></entry> | |
85 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
86 | Shader Uniform Type | |
87 | </emphasis></entry> | |
88 | </row> | |
89 | </thead> | |
90 | <tbody> | |
91 | <row> | |
92 | <entry align="left"> | |
93 | <constant>GL_FLOAT</constant> | |
94 | </entry> | |
95 | <entry align="left"> | |
96 | <constant>float</constant> | |
97 | </entry> | |
98 | </row> | |
99 | <row> | |
100 | <entry align="left"> | |
101 | <constant>GL_FLOAT_VEC2</constant> | |
102 | </entry> | |
103 | <entry align="left"> | |
104 | <constant>vec2</constant> | |
105 | </entry> | |
106 | </row> | |
107 | <row> | |
108 | <entry align="left"> | |
109 | <constant>GL_FLOAT_VEC3</constant> | |
110 | </entry> | |
111 | <entry align="left"> | |
112 | <constant>vec3</constant> | |
113 | </entry> | |
114 | </row> | |
115 | <row> | |
116 | <entry align="left"> | |
117 | <constant>GL_FLOAT_VEC4</constant> | |
118 | </entry> | |
119 | <entry align="left"> | |
120 | <constant>vec4</constant> | |
121 | </entry> | |
122 | </row> | |
123 | <row> | |
124 | <entry align="left"> | |
125 | <constant>GL_DOUBLE</constant> | |
126 | </entry> | |
127 | <entry align="left"> | |
128 | <constant>double</constant> | |
129 | </entry> | |
130 | </row> | |
131 | <row> | |
132 | <entry align="left"> | |
133 | <constant>GL_DOUBLE_VEC2</constant> | |
134 | </entry> | |
135 | <entry align="left"> | |
136 | <constant>dvec2</constant> | |
137 | </entry> | |
138 | </row> | |
139 | <row> | |
140 | <entry align="left"> | |
141 | <constant>GL_DOUBLE_VEC3</constant> | |
142 | </entry> | |
143 | <entry align="left"> | |
144 | <constant>dvec3</constant> | |
145 | </entry> | |
146 | </row> | |
147 | <row> | |
148 | <entry align="left"> | |
149 | <constant>GL_DOUBLE_VEC4</constant> | |
150 | </entry> | |
151 | <entry align="left"> | |
152 | <constant>dvec4</constant> | |
153 | </entry> | |
154 | </row> | |
155 | <row> | |
156 | <entry align="left"> | |
157 | <constant>GL_INT</constant> | |
158 | </entry> | |
159 | <entry align="left"> | |
160 | <constant>int</constant> | |
161 | </entry> | |
162 | </row> | |
163 | <row> | |
164 | <entry align="left"> | |
165 | <constant>GL_INT_VEC2</constant> | |
166 | </entry> | |
167 | <entry align="left"> | |
168 | <constant>ivec2</constant> | |
169 | </entry> | |
170 | </row> | |
171 | <row> | |
172 | <entry align="left"> | |
173 | <constant>GL_INT_VEC3</constant> | |
174 | </entry> | |
175 | <entry align="left"> | |
176 | <constant>ivec3</constant> | |
177 | </entry> | |
178 | </row> | |
179 | <row> | |
180 | <entry align="left"> | |
181 | <constant>GL_INT_VEC4</constant> | |
182 | </entry> | |
183 | <entry align="left"> | |
184 | <constant>ivec4</constant> | |
185 | </entry> | |
186 | </row> | |
187 | <row> | |
188 | <entry align="left"> | |
189 | <constant>GL_UNSIGNED_INT</constant> | |
190 | </entry> | |
191 | <entry align="left"> | |
192 | <constant>unsigned int</constant> | |
193 | </entry> | |
194 | </row> | |
195 | <row> | |
196 | <entry align="left"> | |
197 | <constant>GL_UNSIGNED_INT_VEC2</constant> | |
198 | </entry> | |
199 | <entry align="left"> | |
200 | <constant>uvec2</constant> | |
201 | </entry> | |
202 | </row> | |
203 | <row> | |
204 | <entry align="left"> | |
205 | <constant>GL_UNSIGNED_INT_VEC3</constant> | |
206 | </entry> | |
207 | <entry align="left"> | |
208 | <constant>uvec3</constant> | |
209 | </entry> | |
210 | </row> | |
211 | <row> | |
212 | <entry align="left"> | |
213 | <constant>GL_UNSIGNED_INT_VEC4</constant> | |
214 | </entry> | |
215 | <entry align="left"> | |
216 | <constant>uvec4</constant> | |
217 | </entry> | |
218 | </row> | |
219 | <row> | |
220 | <entry align="left"> | |
221 | <constant>GL_BOOL</constant> | |
222 | </entry> | |
223 | <entry align="left"> | |
224 | <constant>bool</constant> | |
225 | </entry> | |
226 | </row> | |
227 | <row> | |
228 | <entry align="left"> | |
229 | <constant>GL_BOOL_VEC2</constant> | |
230 | </entry> | |
231 | <entry align="left"> | |
232 | <constant>bvec2</constant> | |
233 | </entry> | |
234 | </row> | |
235 | <row> | |
236 | <entry align="left"> | |
237 | <constant>GL_BOOL_VEC3</constant> | |
238 | </entry> | |
239 | <entry align="left"> | |
240 | <constant>bvec3</constant> | |
241 | </entry> | |
242 | </row> | |
243 | <row> | |
244 | <entry align="left"> | |
245 | <constant>GL_BOOL_VEC4</constant> | |
246 | </entry> | |
247 | <entry align="left"> | |
248 | <constant>bvec4</constant> | |
249 | </entry> | |
250 | </row> | |
251 | <row> | |
252 | <entry align="left"> | |
253 | <constant>GL_FLOAT_MAT2</constant> | |
254 | </entry> | |
255 | <entry align="left"> | |
256 | <constant>mat2</constant> | |
257 | </entry> | |
258 | </row> | |
259 | <row> | |
260 | <entry align="left"> | |
261 | <constant>GL_FLOAT_MAT3</constant> | |
262 | </entry> | |
263 | <entry align="left"> | |
264 | <constant>mat3</constant> | |
265 | </entry> | |
266 | </row> | |
267 | <row> | |
268 | <entry align="left"> | |
269 | <constant>GL_FLOAT_MAT4</constant> | |
270 | </entry> | |
271 | <entry align="left"> | |
272 | <constant>mat4</constant> | |
273 | </entry> | |
274 | </row> | |
275 | <row> | |
276 | <entry align="left"> | |
277 | <constant>GL_FLOAT_MAT2x3</constant> | |
278 | </entry> | |
279 | <entry align="left"> | |
280 | <constant>mat2x3</constant> | |
281 | </entry> | |
282 | </row> | |
283 | <row> | |
284 | <entry align="left"> | |
285 | <constant>GL_FLOAT_MAT2x4</constant> | |
286 | </entry> | |
287 | <entry align="left"> | |
288 | <constant>mat2x4</constant> | |
289 | </entry> | |
290 | </row> | |
291 | <row> | |
292 | <entry align="left"> | |
293 | <constant>GL_FLOAT_MAT3x2</constant> | |
294 | </entry> | |
295 | <entry align="left"> | |
296 | <constant>mat3x2</constant> | |
297 | </entry> | |
298 | </row> | |
299 | <row> | |
300 | <entry align="left"> | |
301 | <constant>GL_FLOAT_MAT3x4</constant> | |
302 | </entry> | |
303 | <entry align="left"> | |
304 | <constant>mat3x4</constant> | |
305 | </entry> | |
306 | </row> | |
307 | <row> | |
308 | <entry align="left"> | |
309 | <constant>GL_FLOAT_MAT4x2</constant> | |
310 | </entry> | |
311 | <entry align="left"> | |
312 | <constant>mat4x2</constant> | |
313 | </entry> | |
314 | </row> | |
315 | <row> | |
316 | <entry align="left"> | |
317 | <constant>GL_FLOAT_MAT4x3</constant> | |
318 | </entry> | |
319 | <entry align="left"> | |
320 | <constant>mat4x3</constant> | |
321 | </entry> | |
322 | </row> | |
323 | <row> | |
324 | <entry align="left"> | |
325 | <constant>GL_DOUBLE_MAT2</constant> | |
326 | </entry> | |
327 | <entry align="left"> | |
328 | <constant>dmat2</constant> | |
329 | </entry> | |
330 | </row> | |
331 | <row> | |
332 | <entry align="left"> | |
333 | <constant>GL_DOUBLE_MAT3</constant> | |
334 | </entry> | |
335 | <entry align="left"> | |
336 | <constant>dmat3</constant> | |
337 | </entry> | |
338 | </row> | |
339 | <row> | |
340 | <entry align="left"> | |
341 | <constant>GL_DOUBLE_MAT4</constant> | |
342 | </entry> | |
343 | <entry align="left"> | |
344 | <constant>dmat4</constant> | |
345 | </entry> | |
346 | </row> | |
347 | <row> | |
348 | <entry align="left"> | |
349 | <constant>GL_DOUBLE_MAT2x3</constant> | |
350 | </entry> | |
351 | <entry align="left"> | |
352 | <constant>dmat2x3</constant> | |
353 | </entry> | |
354 | </row> | |
355 | <row> | |
356 | <entry align="left"> | |
357 | <constant>GL_DOUBLE_MAT2x4</constant> | |
358 | </entry> | |
359 | <entry align="left"> | |
360 | <constant>dmat2x4</constant> | |
361 | </entry> | |
362 | </row> | |
363 | <row> | |
364 | <entry align="left"> | |
365 | <constant>GL_DOUBLE_MAT3x2</constant> | |
366 | </entry> | |
367 | <entry align="left"> | |
368 | <constant>dmat3x2</constant> | |
369 | </entry> | |
370 | </row> | |
371 | <row> | |
372 | <entry align="left"> | |
373 | <constant>GL_DOUBLE_MAT3x4</constant> | |
374 | </entry> | |
375 | <entry align="left"> | |
376 | <constant>dmat3x4</constant> | |
377 | </entry> | |
378 | </row> | |
379 | <row> | |
380 | <entry align="left"> | |
381 | <constant>GL_DOUBLE_MAT4x2</constant> | |
382 | </entry> | |
383 | <entry align="left"> | |
384 | <constant>dmat4x2</constant> | |
385 | </entry> | |
386 | </row> | |
387 | <row> | |
388 | <entry align="left"> | |
389 | <constant>GL_DOUBLE_MAT4x3</constant> | |
390 | </entry> | |
391 | <entry align="left"> | |
392 | <constant>dmat4x3</constant> | |
393 | </entry> | |
394 | </row> | |
395 | <row> | |
396 | <entry align="left"> | |
397 | <constant>GL_SAMPLER_1D</constant> | |
398 | </entry> | |
399 | <entry align="left"> | |
400 | <constant>sampler1D</constant> | |
401 | </entry> | |
402 | </row> | |
403 | <row> | |
404 | <entry align="left"> | |
405 | <constant>GL_SAMPLER_2D</constant> | |
406 | </entry> | |
407 | <entry align="left"> | |
408 | <constant>sampler2D</constant> | |
409 | </entry> | |
410 | </row> | |
411 | <row> | |
412 | <entry align="left"> | |
413 | <constant>GL_SAMPLER_3D</constant> | |
414 | </entry> | |
415 | <entry align="left"> | |
416 | <constant>sampler3D</constant> | |
417 | </entry> | |
418 | </row> | |
419 | <row> | |
420 | <entry align="left"> | |
421 | <constant>GL_SAMPLER_CUBE</constant> | |
422 | </entry> | |
423 | <entry align="left"> | |
424 | <constant>samplerCube</constant> | |
425 | </entry> | |
426 | </row> | |
427 | <row> | |
428 | <entry align="left"> | |
429 | <constant>GL_SAMPLER_1D_SHADOW</constant> | |
430 | </entry> | |
431 | <entry align="left"> | |
432 | <constant>sampler1DShadow</constant> | |
433 | </entry> | |
434 | </row> | |
435 | <row> | |
436 | <entry align="left"> | |
437 | <constant>GL_SAMPLER_2D_SHADOW</constant> | |
438 | </entry> | |
439 | <entry align="left"> | |
440 | <constant>sampler2DShadow</constant> | |
441 | </entry> | |
442 | </row> | |
443 | <row> | |
444 | <entry align="left"> | |
445 | <constant>GL_SAMPLER_1D_ARRAY</constant> | |
446 | </entry> | |
447 | <entry align="left"> | |
448 | <constant>sampler1DArray</constant> | |
449 | </entry> | |
450 | </row> | |
451 | <row> | |
452 | <entry align="left"> | |
453 | <constant>GL_SAMPLER_2D_ARRAY</constant> | |
454 | </entry> | |
455 | <entry align="left"> | |
456 | <constant>sampler2DArray</constant> | |
457 | </entry> | |
458 | </row> | |
459 | <row> | |
460 | <entry align="left"> | |
461 | <constant>GL_SAMPLER_1D_ARRAY_SHADOW</constant> | |
462 | </entry> | |
463 | <entry align="left"> | |
464 | <constant>sampler1DArrayShadow</constant> | |
465 | </entry> | |
466 | </row> | |
467 | <row> | |
468 | <entry align="left"> | |
469 | <constant>GL_SAMPLER_2D_ARRAY_SHADOW</constant> | |
470 | </entry> | |
471 | <entry align="left"> | |
472 | <constant>sampler2DArrayShadow</constant> | |
473 | </entry> | |
474 | </row> | |
475 | <row> | |
476 | <entry align="left"> | |
477 | <constant>GL_SAMPLER_2D_MULTISAMPLE</constant> | |
478 | </entry> | |
479 | <entry align="left"> | |
480 | <constant>sampler2DMS</constant> | |
481 | </entry> | |
482 | </row> | |
483 | <row> | |
484 | <entry align="left"> | |
485 | <constant>GL_SAMPLER_2D_MULTISAMPLE_ARRAY</constant> | |
486 | </entry> | |
487 | <entry align="left"> | |
488 | <constant>sampler2DMSArray</constant> | |
489 | </entry> | |
490 | </row> | |
491 | <row> | |
492 | <entry align="left"> | |
493 | <constant>GL_SAMPLER_CUBE_SHADOW</constant> | |
494 | </entry> | |
495 | <entry align="left"> | |
496 | <constant>samplerCubeShadow</constant> | |
497 | </entry> | |
498 | </row> | |
499 | <row> | |
500 | <entry align="left"> | |
501 | <constant>GL_SAMPLER_BUFFER</constant> | |
502 | </entry> | |
503 | <entry align="left"> | |
504 | <constant>samplerBuffer</constant> | |
505 | </entry> | |
506 | </row> | |
507 | <row> | |
508 | <entry align="left"> | |
509 | <constant>GL_SAMPLER_2D_RECT</constant> | |
510 | </entry> | |
511 | <entry align="left"> | |
512 | <constant>sampler2DRect</constant> | |
513 | </entry> | |
514 | </row> | |
515 | <row> | |
516 | <entry align="left"> | |
517 | <constant>GL_SAMPLER_2D_RECT_SHADOW</constant> | |
518 | </entry> | |
519 | <entry align="left"> | |
520 | <constant>sampler2DRectShadow</constant> | |
521 | </entry> | |
522 | </row> | |
523 | <row> | |
524 | <entry align="left"> | |
525 | <constant>GL_INT_SAMPLER_1D</constant> | |
526 | </entry> | |
527 | <entry align="left"> | |
528 | <constant>isampler1D</constant> | |
529 | </entry> | |
530 | </row> | |
531 | <row> | |
532 | <entry align="left"> | |
533 | <constant>GL_INT_SAMPLER_2D</constant> | |
534 | </entry> | |
535 | <entry align="left"> | |
536 | <constant>isampler2D</constant> | |
537 | </entry> | |
538 | </row> | |
539 | <row> | |
540 | <entry align="left"> | |
541 | <constant>GL_INT_SAMPLER_3D</constant> | |
542 | </entry> | |
543 | <entry align="left"> | |
544 | <constant>isampler3D</constant> | |
545 | </entry> | |
546 | </row> | |
547 | <row> | |
548 | <entry align="left"> | |
549 | <constant>GL_INT_SAMPLER_CUBE</constant> | |
550 | </entry> | |
551 | <entry align="left"> | |
552 | <constant>isamplerCube</constant> | |
553 | </entry> | |
554 | </row> | |
555 | <row> | |
556 | <entry align="left"> | |
557 | <constant>GL_INT_SAMPLER_1D_ARRAY</constant> | |
558 | </entry> | |
559 | <entry align="left"> | |
560 | <constant>isampler1DArray</constant> | |
561 | </entry> | |
562 | </row> | |
563 | <row> | |
564 | <entry align="left"> | |
565 | <constant>GL_INT_SAMPLER_2D_ARRAY</constant> | |
566 | </entry> | |
567 | <entry align="left"> | |
568 | <constant>isampler2DArray</constant> | |
569 | </entry> | |
570 | </row> | |
571 | <row> | |
572 | <entry align="left"> | |
573 | <constant>GL_INT_SAMPLER_2D_MULTISAMPLE</constant> | |
574 | </entry> | |
575 | <entry align="left"> | |
576 | <constant>isampler2DMS</constant> | |
577 | </entry> | |
578 | </row> | |
579 | <row> | |
580 | <entry align="left"> | |
581 | <constant>GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant> | |
582 | </entry> | |
583 | <entry align="left"> | |
584 | <constant>isampler2DMSArray</constant> | |
585 | </entry> | |
586 | </row> | |
587 | <row> | |
588 | <entry align="left"> | |
589 | <constant>GL_INT_SAMPLER_BUFFER</constant> | |
590 | </entry> | |
591 | <entry align="left"> | |
592 | <constant>isamplerBuffer</constant> | |
593 | </entry> | |
594 | </row> | |
595 | <row> | |
596 | <entry align="left"> | |
597 | <constant>GL_INT_SAMPLER_2D_RECT</constant> | |
598 | </entry> | |
599 | <entry align="left"> | |
600 | <constant>isampler2DRect</constant> | |
601 | </entry> | |
602 | </row> | |
603 | <row> | |
604 | <entry align="left"> | |
605 | <constant>GL_UNSIGNED_INT_SAMPLER_1D</constant> | |
606 | </entry> | |
607 | <entry align="left"> | |
608 | <constant>usampler1D</constant> | |
609 | </entry> | |
610 | </row> | |
611 | <row> | |
612 | <entry align="left"> | |
613 | <constant>GL_UNSIGNED_INT_SAMPLER_2D</constant> | |
614 | </entry> | |
615 | <entry align="left"> | |
616 | <constant>usampler2D</constant> | |
617 | </entry> | |
618 | </row> | |
619 | <row> | |
620 | <entry align="left"> | |
621 | <constant>GL_UNSIGNED_INT_SAMPLER_3D</constant> | |
622 | </entry> | |
623 | <entry align="left"> | |
624 | <constant>usampler3D</constant> | |
625 | </entry> | |
626 | </row> | |
627 | <row> | |
628 | <entry align="left"> | |
629 | <constant>GL_UNSIGNED_INT_SAMPLER_CUBE</constant> | |
630 | </entry> | |
631 | <entry align="left"> | |
632 | <constant>usamplerCube</constant> | |
633 | </entry> | |
634 | </row> | |
635 | <row> | |
636 | <entry align="left"> | |
637 | <constant>GL_UNSIGNED_INT_SAMPLER_1D_ARRAY</constant> | |
638 | </entry> | |
639 | <entry align="left"> | |
640 | <constant>usampler2DArray</constant> | |
641 | </entry> | |
642 | </row> | |
643 | <row> | |
644 | <entry align="left"> | |
645 | <constant>GL_UNSIGNED_INT_SAMPLER_2D_ARRAY</constant> | |
646 | </entry> | |
647 | <entry align="left"> | |
648 | <constant>usampler2DArray</constant> | |
649 | </entry> | |
650 | </row> | |
651 | <row> | |
652 | <entry align="left"> | |
653 | <constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE</constant> | |
654 | </entry> | |
655 | <entry align="left"> | |
656 | <constant>usampler2DMS</constant> | |
657 | </entry> | |
658 | </row> | |
659 | <row> | |
660 | <entry align="left"> | |
661 | <constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant> | |
662 | </entry> | |
663 | <entry align="left"> | |
664 | <constant>usampler2DMSArray</constant> | |
665 | </entry> | |
666 | </row> | |
667 | <row> | |
668 | <entry align="left"> | |
669 | <constant>GL_UNSIGNED_INT_SAMPLER_BUFFER</constant> | |
670 | </entry> | |
671 | <entry align="left"> | |
672 | <constant>usamplerBuffer</constant> | |
673 | </entry> | |
674 | </row> | |
675 | <row> | |
676 | <entry align="left"> | |
677 | <constant>GL_UNSIGNED_INT_SAMPLER_2D_RECT</constant> | |
678 | </entry> | |
679 | <entry align="left"> | |
680 | <constant>usampler2DRect</constant> | |
681 | </entry> | |
682 | </row> | |
683 | </tbody> | |
684 | </tgroup> | |
685 | </informaltable> | |
686 | </para> | |
687 | <para> | |
688 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_SIZE</constant>, then an array identifying the | |
689 | size of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is | |
690 | returned. The sizes returned are in units of the type returned by a query of <constant>GL_UNIFORM_TYPE</constant>. | |
691 | For active uniforms that are arrays, the size is the number of active elements in the array; | |
692 | for all other uniforms, the size is one. | |
693 | </para> | |
694 | <para> | |
695 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_NAME_LENGTH</constant>, then an array identifying the | |
696 | length, including the terminating null character, of the uniform name strings specified by the corresponding | |
697 | array of <parameter>uniformIndices</parameter> is returned. | |
698 | </para> | |
699 | <para> | |
700 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_BLOCK_INDEX</constant>, then an array identifying the | |
701 | the uniform block index of each of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> | |
702 | is returned. The uniform block index of a uniform associated with the default uniform block is -1. | |
703 | </para> | |
704 | <para> | |
705 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_OFFSET</constant>, then an array of uniform buffer | |
706 | offsets is returned. For uniforms in a named uniform block, the returned value will be its offset, in basic | |
707 | machine units, relative to the beginning of the uniform block in the buffer object data store. | |
708 | For atomic counter uniforms, the returned value will be its offset relative to the beginning of its active | |
709 | atomic counter buffer. | |
710 | For all other uniforms, -1 will be returned. | |
711 | </para> | |
712 | <para> | |
713 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_ARRAY_STRIDE</constant>, then an array identifying the | |
714 | stride between elements of each of the uniforms specified by the corresponding array of | |
715 | <parameter>uniformIndices</parameter> is returned. | |
716 | For uniforms in named uniform blocks and for uniforms declared as atomic counters, the stride is the difference, | |
717 | in basic machine units, of consecutive elements in an array, or zero for uniforms not declared as an array. | |
718 | For all other uniforms, a stride of -1 will be returned. | |
719 | </para> | |
720 | <para> | |
721 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_MATRIX_STRIDE</constant>, then an array identifying the stride | |
722 | between columns of a column-major matrix or rows of a row-major matrix, in basic machine units, of each of the uniforms | |
723 | specified by the corresponding array of <parameter>uniformIndices</parameter> is returned. The matrix stride of a | |
724 | uniform associated with the default uniform block is -1. Note that this information only makes sense for uniforms | |
725 | that are matrices. For uniforms that are not matrices, but are declared in a named uniform block, a matrix stride of | |
726 | zero is returned. | |
727 | </para> | |
728 | <para> | |
729 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_IS_ROW_MAJOR</constant>, then an array identifying whether each | |
730 | of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is a row-major matrix or not is returned. A | |
731 | value of one indicates a row-major matrix, and a value of zero indicates a column-major matrix, a matrix in the default | |
732 | uniform block, or a non-matrix. | |
733 | </para> | |
734 | <para> | |
735 | If <parameter>pname</parameter> is <constant>GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX</constant>, then an array | |
736 | identifying the active atomic counter buffer index of each of the uniforms specified by the corresponding array | |
737 | of <parameter>uniformIndices</parameter> is returned. For uniforms other than atomic counters, the returned buffer | |
738 | index is -1. The returned indices may be passed to <citerefentry><refentrytitle>glGetActiveAtomicCounterBufferiv</refentrytitle></citerefentry> | |
739 | to query the properties of the associated buffer, and not necessarily the binding point specified in the uniform declaration. | |
740 | </para> | |
741 | </refsect1> | |
742 | <refsect1 id="notes"><title>Notes</title> | |
743 | <para> | |
744 | The double types, <constant>GL_DOUBLE</constant>, <constant>GL_DOUBLE_VEC2</constant>, | |
745 | <constant>GL_DOUBLE_VEC3</constant>, <constant>GL_DOUBLE_VEC4</constant>, | |
746 | <constant>GL_DOUBLE_MAT2</constant>, <constant>GL_DOUBLE_MAT3</constant>, | |
747 | <constant>GL_DOUBLE_MAT4</constant>, <constant>GL_DOUBLE_MAT2x3</constant>, | |
748 | <constant>GL_DOUBLE_MAT2x4</constant>, <constant>GL_DOUBLE_MAT3x2</constant>, | |
749 | <constant>GL_DOUBLE_MAT3x4</constant>, <constant>GL_DOUBLE_MAT4x2</constant>, | |
750 | and <constant>GL_DOUBLE_MAT4x3</constant> are only available if the GL | |
751 | version is 4.1 or higher. | |
752 | </para> | |
753 | <para> | |
754 | <constant>GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX</constant> is only accepted by <parameter>pname</parameter> | |
755 | if the GL version is 4.2 or higher. | |
756 | </para> | |
757 | </refsect1> | |
758 | <refsect1 id="errors"><title>Errors</title> | |
759 | <para><constant>GL_INVALID_VALUE</constant> is generated if | |
760 | <parameter>program</parameter> is not a value generated by | |
761 | OpenGL.</para> | |
762 | ||
763 | <para><constant>GL_INVALID_OPERATION</constant> is generated if | |
764 | <parameter>program</parameter> is not a program object.</para> | |
765 | ||
766 | <para><constant>GL_INVALID_VALUE</constant> is generated if | |
767 | <parameter>uniformCount</parameter> is greater than or equal to the | |
768 | value of <constant>GL_ACTIVE_UNIFORMS</constant> for | |
769 | <parameter>program</parameter>.</para> | |
770 | ||
771 | <para><constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> | |
772 | is not an accepted token.</para> | |
773 | </refsect1> | |
774 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
775 | <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> | |
776 | with argument <constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS</constant>, | |
777 | <constant>GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS</constant>, | |
778 | <constant>GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS</constant>, | |
779 | <constant>GL_MAX_GEOMETRY_UNIFORM_COMPONENTS</constant>, | |
780 | <constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant>, or | |
781 | <constant>GL_MAX_COMBINED_UNIFORM_COMPONENTS</constant>.</para> | |
782 | ||
783 | <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry> | |
784 | with argument <constant>GL_ACTIVE_UNIFORMS</constant> or | |
785 | <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>.</para> | |
786 | ||
787 | <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para> | |
788 | </refsect1> | |
789 | <refsect1 id="seealso"><title>See Also</title> | |
790 | <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>, | |
791 | <citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>, | |
792 | <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>, | |
793 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>, | |
794 | <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>, | |
795 | <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para> | |
796 | </refsect1> | |
797 | <refsect1 id="Copyright"><title>Copyright</title> | |
798 | <para> | |
799 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group | |
800 | This material may be distributed subject to the terms and conditions set forth in | |
801 | the Open Publication License, v 1.0, 8 June 1999. | |
802 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
803 | </para> | |
804 | </refsect1> | |
805 | </refentry> |