update upstream sources
[clinton/guile-figl.git] / upstream-doc / man4 / glGetActiveUniform.xml
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="glGetActiveUniform">
5 <refmeta>
6 <refentrytitle>glGetActiveUniform</refentrytitle>
7 <manvolnum>3G</manvolnum>
8 </refmeta>
9 <refnamediv>
10 <refname>glGetActiveUniform</refname>
11 <refpurpose>Returns information about an active uniform variable for the specified program object</refpurpose>
12 </refnamediv>
13 <refsynopsisdiv><title>C Specification</title>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>void <function>glGetActiveUniform</function></funcdef>
17 <paramdef>GLuint <parameter>program</parameter></paramdef>
18 <paramdef>GLuint <parameter>index</parameter></paramdef>
19 <paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
20 <paramdef>GLsizei *<parameter>length</parameter></paramdef>
21 <paramdef>GLint *<parameter>size</parameter></paramdef>
22 <paramdef>GLenum *<parameter>type</parameter></paramdef>
23 <paramdef>GLchar *<parameter>name</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>program</parameter></term>
31 <listitem>
32 <para>Specifies the program object to be
33 queried.</para>
34 </listitem>
35 </varlistentry>
36 <varlistentry>
37 <term><parameter>index</parameter></term>
38 <listitem>
39 <para>Specifies the index of the uniform variable to
40 be queried.</para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term><parameter>bufSize</parameter></term>
45 <listitem>
46 <para>Specifies the maximum number of characters
47 OpenGL is allowed to write in the character buffer
48 indicated by <parameter>name</parameter>.</para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term><parameter>length</parameter></term>
53 <listitem>
54 <para>Returns the number of characters actually
55 written by OpenGL in the string indicated by
56 <parameter>name</parameter> (excluding the null
57 terminator) if a value other than
58 <constant>NULL</constant> is passed.</para>
59 </listitem>
60 </varlistentry>
61 <varlistentry>
62 <term><parameter>size</parameter></term>
63 <listitem>
64 <para>Returns the size of the uniform
65 variable.</para>
66 </listitem>
67 </varlistentry>
68 <varlistentry>
69 <term><parameter>type</parameter></term>
70 <listitem>
71 <para>Returns the data type of the uniform
72 variable.</para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term><parameter>name</parameter></term>
77 <listitem>
78 <para>Returns a null terminated string containing
79 the name of the uniform variable.</para>
80 </listitem>
81 </varlistentry>
82 </variablelist>
83 </refsect1>
84 <refsect1 id="description"><title>Description</title>
85 <para><function>glGetActiveUniform</function> returns
86 information about an active uniform variable in the program
87 object specified by <parameter>program</parameter>. The number
88 of active uniform variables can be obtained by calling
89 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
90 with the value <constant>GL_ACTIVE_UNIFORMS</constant>. A value
91 of 0 for <parameter>index</parameter> selects the first active
92 uniform variable. Permissible values for
93 <parameter>index</parameter> range from 0 to the number of
94 active uniform variables minus 1.</para>
95
96 <para>Shaders may use either built-in uniform variables,
97 user-defined uniform variables, or both. Built-in uniform
98 variables have a prefix of &quot;gl_&quot; and reference
99 existing OpenGL state or values derived from such state (e.g.,
100 <parameter>gl_DepthRangeParameters</parameter>, see the OpenGL
101 Shading Language specification for a complete list.)
102 User-defined uniform variables have arbitrary names and obtain
103 their values from the application through calls to
104 <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>.
105 A uniform variable (either built-in or user-defined) is
106 considered active if it is determined during the link operation
107 that it may be accessed during program execution. Therefore,
108 <parameter>program</parameter> should have previously been the
109 target of a call to
110 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
111 but it is not necessary for it to have been linked
112 successfully.</para>
113
114 <para>The size of the character buffer required to store the
115 longest uniform variable name in <parameter>program</parameter>
116 can be obtained by calling
117 <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
118 with the value
119 <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>. This value
120 should be used to allocate a buffer of sufficient size to store
121 the returned uniform variable name. The size of this character
122 buffer is passed in <parameter>bufSize</parameter>, and a
123 pointer to this character buffer is passed in
124 <parameter>name.</parameter></para>
125
126 <para><function>glGetActiveUniform</function> returns the name
127 of the uniform variable indicated by
128 <parameter>index</parameter>, storing it in the character buffer
129 specified by <parameter>name</parameter>. The string returned
130 will be null terminated. The actual number of characters written
131 into this buffer is returned in <parameter>length</parameter>,
132 and this count does not include the null termination character.
133 If the length of the returned string is not required, a value of
134 <constant>NULL</constant> can be passed in the
135 <parameter>length</parameter> argument.</para>
136
137 <para>The <parameter>type</parameter>
138 argument will return a pointer to the uniform variable's data
139 type. The symbolic constants returned for uniform types are shown in the
140 table below.
141 <informaltable frame="topbot">
142 <tgroup cols="2" align="left">
143 <colspec colwidth="1.1*" />
144 <colspec colwidth="1*" />
145 <thead>
146 <row>
147 <entry rowsep="1" align="left"><emphasis role="bold">
148 Returned Symbolic Contant
149 </emphasis></entry>
150 <entry rowsep="1" align="left"><emphasis role="bold">
151 Shader Uniform Type
152 </emphasis></entry>
153 </row>
154 </thead>
155 <tbody>
156 <row>
157 <entry align="left">
158 <constant>GL_FLOAT</constant>
159 </entry>
160 <entry align="left">
161 <constant>float</constant>
162 </entry>
163 </row>
164 <row>
165 <entry align="left">
166 <constant>GL_FLOAT_VEC2</constant>
167 </entry>
168 <entry align="left">
169 <constant>vec2</constant>
170 </entry>
171 </row>
172 <row>
173 <entry align="left">
174 <constant>GL_FLOAT_VEC3</constant>
175 </entry>
176 <entry align="left">
177 <constant>vec3</constant>
178 </entry>
179 </row>
180 <row>
181 <entry align="left">
182 <constant>GL_FLOAT_VEC4</constant>
183 </entry>
184 <entry align="left">
185 <constant>vec4</constant>
186 </entry>
187 </row>
188 <row>
189 <entry align="left">
190 <constant>GL_DOUBLE</constant>
191 </entry>
192 <entry align="left">
193 <constant>double</constant>
194 </entry>
195 </row>
196 <row>
197 <entry align="left">
198 <constant>GL_DOUBLE_VEC2</constant>
199 </entry>
200 <entry align="left">
201 <constant>dvec2</constant>
202 </entry>
203 </row>
204 <row>
205 <entry align="left">
206 <constant>GL_DOUBLE_VEC3</constant>
207 </entry>
208 <entry align="left">
209 <constant>dvec3</constant>
210 </entry>
211 </row>
212 <row>
213 <entry align="left">
214 <constant>GL_DOUBLE_VEC4</constant>
215 </entry>
216 <entry align="left">
217 <constant>dvec4</constant>
218 </entry>
219 </row>
220 <row>
221 <entry align="left">
222 <constant>GL_INT</constant>
223 </entry>
224 <entry align="left">
225 <constant>int</constant>
226 </entry>
227 </row>
228 <row>
229 <entry align="left">
230 <constant>GL_INT_VEC2</constant>
231 </entry>
232 <entry align="left">
233 <constant>ivec2</constant>
234 </entry>
235 </row>
236 <row>
237 <entry align="left">
238 <constant>GL_INT_VEC3</constant>
239 </entry>
240 <entry align="left">
241 <constant>ivec3</constant>
242 </entry>
243 </row>
244 <row>
245 <entry align="left">
246 <constant>GL_INT_VEC4</constant>
247 </entry>
248 <entry align="left">
249 <constant>ivec4</constant>
250 </entry>
251 </row>
252 <row>
253 <entry align="left">
254 <constant>GL_UNSIGNED_INT</constant>
255 </entry>
256 <entry align="left">
257 <constant>unsigned int</constant>
258 </entry>
259 </row>
260 <row>
261 <entry align="left">
262 <constant>GL_UNSIGNED_INT_VEC2</constant>
263 </entry>
264 <entry align="left">
265 <constant>uvec2</constant>
266 </entry>
267 </row>
268 <row>
269 <entry align="left">
270 <constant>GL_UNSIGNED_INT_VEC3</constant>
271 </entry>
272 <entry align="left">
273 <constant>uvec3</constant>
274 </entry>
275 </row>
276 <row>
277 <entry align="left">
278 <constant>GL_UNSIGNED_INT_VEC4</constant>
279 </entry>
280 <entry align="left">
281 <constant>uvec4</constant>
282 </entry>
283 </row>
284 <row>
285 <entry align="left">
286 <constant>GL_BOOL</constant>
287 </entry>
288 <entry align="left">
289 <constant>bool</constant>
290 </entry>
291 </row>
292 <row>
293 <entry align="left">
294 <constant>GL_BOOL_VEC2</constant>
295 </entry>
296 <entry align="left">
297 <constant>bvec2</constant>
298 </entry>
299 </row>
300 <row>
301 <entry align="left">
302 <constant>GL_BOOL_VEC3</constant>
303 </entry>
304 <entry align="left">
305 <constant>bvec3</constant>
306 </entry>
307 </row>
308 <row>
309 <entry align="left">
310 <constant>GL_BOOL_VEC4</constant>
311 </entry>
312 <entry align="left">
313 <constant>bvec4</constant>
314 </entry>
315 </row>
316 <row>
317 <entry align="left">
318 <constant>GL_FLOAT_MAT2</constant>
319 </entry>
320 <entry align="left">
321 <constant>mat2</constant>
322 </entry>
323 </row>
324 <row>
325 <entry align="left">
326 <constant>GL_FLOAT_MAT3</constant>
327 </entry>
328 <entry align="left">
329 <constant>mat3</constant>
330 </entry>
331 </row>
332 <row>
333 <entry align="left">
334 <constant>GL_FLOAT_MAT4</constant>
335 </entry>
336 <entry align="left">
337 <constant>mat4</constant>
338 </entry>
339 </row>
340 <row>
341 <entry align="left">
342 <constant>GL_FLOAT_MAT2x3</constant>
343 </entry>
344 <entry align="left">
345 <constant>mat2x3</constant>
346 </entry>
347 </row>
348 <row>
349 <entry align="left">
350 <constant>GL_FLOAT_MAT2x4</constant>
351 </entry>
352 <entry align="left">
353 <constant>mat2x4</constant>
354 </entry>
355 </row>
356 <row>
357 <entry align="left">
358 <constant>GL_FLOAT_MAT3x2</constant>
359 </entry>
360 <entry align="left">
361 <constant>mat3x2</constant>
362 </entry>
363 </row>
364 <row>
365 <entry align="left">
366 <constant>GL_FLOAT_MAT3x4</constant>
367 </entry>
368 <entry align="left">
369 <constant>mat3x4</constant>
370 </entry>
371 </row>
372 <row>
373 <entry align="left">
374 <constant>GL_FLOAT_MAT4x2</constant>
375 </entry>
376 <entry align="left">
377 <constant>mat4x2</constant>
378 </entry>
379 </row>
380 <row>
381 <entry align="left">
382 <constant>GL_FLOAT_MAT4x3</constant>
383 </entry>
384 <entry align="left">
385 <constant>mat4x3</constant>
386 </entry>
387 </row>
388 <row>
389 <entry align="left">
390 <constant>GL_DOUBLE_MAT2</constant>
391 </entry>
392 <entry align="left">
393 <constant>dmat2</constant>
394 </entry>
395 </row>
396 <row>
397 <entry align="left">
398 <constant>GL_DOUBLE_MAT3</constant>
399 </entry>
400 <entry align="left">
401 <constant>dmat3</constant>
402 </entry>
403 </row>
404 <row>
405 <entry align="left">
406 <constant>GL_DOUBLE_MAT4</constant>
407 </entry>
408 <entry align="left">
409 <constant>dmat4</constant>
410 </entry>
411 </row>
412 <row>
413 <entry align="left">
414 <constant>GL_DOUBLE_MAT2x3</constant>
415 </entry>
416 <entry align="left">
417 <constant>dmat2x3</constant>
418 </entry>
419 </row>
420 <row>
421 <entry align="left">
422 <constant>GL_DOUBLE_MAT2x4</constant>
423 </entry>
424 <entry align="left">
425 <constant>dmat2x4</constant>
426 </entry>
427 </row>
428 <row>
429 <entry align="left">
430 <constant>GL_DOUBLE_MAT3x2</constant>
431 </entry>
432 <entry align="left">
433 <constant>dmat3x2</constant>
434 </entry>
435 </row>
436 <row>
437 <entry align="left">
438 <constant>GL_DOUBLE_MAT3x4</constant>
439 </entry>
440 <entry align="left">
441 <constant>dmat3x4</constant>
442 </entry>
443 </row>
444 <row>
445 <entry align="left">
446 <constant>GL_DOUBLE_MAT4x2</constant>
447 </entry>
448 <entry align="left">
449 <constant>dmat4x2</constant>
450 </entry>
451 </row>
452 <row>
453 <entry align="left">
454 <constant>GL_DOUBLE_MAT4x3</constant>
455 </entry>
456 <entry align="left">
457 <constant>dmat4x3</constant>
458 </entry>
459 </row>
460 <row>
461 <entry align="left">
462 <constant>GL_SAMPLER_1D</constant>
463 </entry>
464 <entry align="left">
465 <constant>sampler1D</constant>
466 </entry>
467 </row>
468 <row>
469 <entry align="left">
470 <constant>GL_SAMPLER_2D</constant>
471 </entry>
472 <entry align="left">
473 <constant>sampler2D</constant>
474 </entry>
475 </row>
476 <row>
477 <entry align="left">
478 <constant>GL_SAMPLER_3D</constant>
479 </entry>
480 <entry align="left">
481 <constant>sampler3D</constant>
482 </entry>
483 </row>
484 <row>
485 <entry align="left">
486 <constant>GL_SAMPLER_CUBE</constant>
487 </entry>
488 <entry align="left">
489 <constant>samplerCube</constant>
490 </entry>
491 </row>
492 <row>
493 <entry align="left">
494 <constant>GL_SAMPLER_1D_SHADOW</constant>
495 </entry>
496 <entry align="left">
497 <constant>sampler1DShadow</constant>
498 </entry>
499 </row>
500 <row>
501 <entry align="left">
502 <constant>GL_SAMPLER_2D_SHADOW</constant>
503 </entry>
504 <entry align="left">
505 <constant>sampler2DShadow</constant>
506 </entry>
507 </row>
508 <row>
509 <entry align="left">
510 <constant>GL_SAMPLER_1D_ARRAY</constant>
511 </entry>
512 <entry align="left">
513 <constant>sampler1DArray</constant>
514 </entry>
515 </row>
516 <row>
517 <entry align="left">
518 <constant>GL_SAMPLER_2D_ARRAY</constant>
519 </entry>
520 <entry align="left">
521 <constant>sampler2DArray</constant>
522 </entry>
523 </row>
524 <row>
525 <entry align="left">
526 <constant>GL_SAMPLER_1D_ARRAY_SHADOW</constant>
527 </entry>
528 <entry align="left">
529 <constant>sampler1DArrayShadow</constant>
530 </entry>
531 </row>
532 <row>
533 <entry align="left">
534 <constant>GL_SAMPLER_2D_ARRAY_SHADOW</constant>
535 </entry>
536 <entry align="left">
537 <constant>sampler2DArrayShadow</constant>
538 </entry>
539 </row>
540 <row>
541 <entry align="left">
542 <constant>GL_SAMPLER_2D_MULTISAMPLE</constant>
543 </entry>
544 <entry align="left">
545 <constant>sampler2DMS</constant>
546 </entry>
547 </row>
548 <row>
549 <entry align="left">
550 <constant>GL_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
551 </entry>
552 <entry align="left">
553 <constant>sampler2DMSArray</constant>
554 </entry>
555 </row>
556 <row>
557 <entry align="left">
558 <constant>GL_SAMPLER_CUBE_SHADOW</constant>
559 </entry>
560 <entry align="left">
561 <constant>samplerCubeShadow</constant>
562 </entry>
563 </row>
564 <row>
565 <entry align="left">
566 <constant>GL_SAMPLER_BUFFER</constant>
567 </entry>
568 <entry align="left">
569 <constant>samplerBuffer</constant>
570 </entry>
571 </row>
572 <row>
573 <entry align="left">
574 <constant>GL_SAMPLER_2D_RECT</constant>
575 </entry>
576 <entry align="left">
577 <constant>sampler2DRect</constant>
578 </entry>
579 </row>
580 <row>
581 <entry align="left">
582 <constant>GL_SAMPLER_2D_RECT_SHADOW</constant>
583 </entry>
584 <entry align="left">
585 <constant>sampler2DRectShadow</constant>
586 </entry>
587 </row>
588 <row>
589 <entry align="left">
590 <constant>GL_INT_SAMPLER_1D</constant>
591 </entry>
592 <entry align="left">
593 <constant>isampler1D</constant>
594 </entry>
595 </row>
596 <row>
597 <entry align="left">
598 <constant>GL_INT_SAMPLER_2D</constant>
599 </entry>
600 <entry align="left">
601 <constant>isampler2D</constant>
602 </entry>
603 </row>
604 <row>
605 <entry align="left">
606 <constant>GL_INT_SAMPLER_3D</constant>
607 </entry>
608 <entry align="left">
609 <constant>isampler3D</constant>
610 </entry>
611 </row>
612 <row>
613 <entry align="left">
614 <constant>GL_INT_SAMPLER_CUBE</constant>
615 </entry>
616 <entry align="left">
617 <constant>isamplerCube</constant>
618 </entry>
619 </row>
620 <row>
621 <entry align="left">
622 <constant>GL_INT_SAMPLER_1D_ARRAY</constant>
623 </entry>
624 <entry align="left">
625 <constant>isampler1DArray</constant>
626 </entry>
627 </row>
628 <row>
629 <entry align="left">
630 <constant>GL_INT_SAMPLER_2D_ARRAY</constant>
631 </entry>
632 <entry align="left">
633 <constant>isampler2DArray</constant>
634 </entry>
635 </row>
636 <row>
637 <entry align="left">
638 <constant>GL_INT_SAMPLER_2D_MULTISAMPLE</constant>
639 </entry>
640 <entry align="left">
641 <constant>isampler2DMS</constant>
642 </entry>
643 </row>
644 <row>
645 <entry align="left">
646 <constant>GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
647 </entry>
648 <entry align="left">
649 <constant>isampler2DMSArray</constant>
650 </entry>
651 </row>
652 <row>
653 <entry align="left">
654 <constant>GL_INT_SAMPLER_BUFFER</constant>
655 </entry>
656 <entry align="left">
657 <constant>isamplerBuffer</constant>
658 </entry>
659 </row>
660 <row>
661 <entry align="left">
662 <constant>GL_INT_SAMPLER_2D_RECT</constant>
663 </entry>
664 <entry align="left">
665 <constant>isampler2DRect</constant>
666 </entry>
667 </row>
668 <row>
669 <entry align="left">
670 <constant>GL_UNSIGNED_INT_SAMPLER_1D</constant>
671 </entry>
672 <entry align="left">
673 <constant>usampler1D</constant>
674 </entry>
675 </row>
676 <row>
677 <entry align="left">
678 <constant>GL_UNSIGNED_INT_SAMPLER_2D</constant>
679 </entry>
680 <entry align="left">
681 <constant>usampler2D</constant>
682 </entry>
683 </row>
684 <row>
685 <entry align="left">
686 <constant>GL_UNSIGNED_INT_SAMPLER_3D</constant>
687 </entry>
688 <entry align="left">
689 <constant>usampler3D</constant>
690 </entry>
691 </row>
692 <row>
693 <entry align="left">
694 <constant>GL_UNSIGNED_INT_SAMPLER_CUBE</constant>
695 </entry>
696 <entry align="left">
697 <constant>usamplerCube</constant>
698 </entry>
699 </row>
700 <row>
701 <entry align="left">
702 <constant>GL_UNSIGNED_INT_SAMPLER_1D_ARRAY</constant>
703 </entry>
704 <entry align="left">
705 <constant>usampler2DArray</constant>
706 </entry>
707 </row>
708 <row>
709 <entry align="left">
710 <constant>GL_UNSIGNED_INT_SAMPLER_2D_ARRAY</constant>
711 </entry>
712 <entry align="left">
713 <constant>usampler2DArray</constant>
714 </entry>
715 </row>
716 <row>
717 <entry align="left">
718 <constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE</constant>
719 </entry>
720 <entry align="left">
721 <constant>usampler2DMS</constant>
722 </entry>
723 </row>
724 <row>
725 <entry align="left">
726 <constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
727 </entry>
728 <entry align="left">
729 <constant>usampler2DMSArray</constant>
730 </entry>
731 </row>
732 <row>
733 <entry align="left">
734 <constant>GL_UNSIGNED_INT_SAMPLER_BUFFER</constant>
735 </entry>
736 <entry align="left">
737 <constant>usamplerBuffer</constant>
738 </entry>
739 </row>
740 <row>
741 <entry align="left">
742 <constant>GL_UNSIGNED_INT_SAMPLER_2D_RECT</constant>
743 </entry>
744 <entry align="left">
745 <constant>usampler2DRect</constant>
746 </entry>
747 </row>
748
749 <row>
750 <entry align="left">
751 <constant>GL_IMAGE_1D</constant>
752 </entry>
753 <entry align="left">
754 <constant>image1D</constant>
755 </entry>
756 </row>
757 <row>
758 <entry align="left">
759 <constant>GL_IMAGE_2D</constant>
760 </entry>
761 <entry align="left">
762 <constant>image2D</constant>
763 </entry>
764 </row>
765 <row>
766 <entry align="left">
767 <constant>GL_IMAGE_3D</constant>
768 </entry>
769 <entry align="left">
770 <constant>image3D</constant>
771 </entry>
772 </row>
773 <row>
774 <entry align="left">
775 <constant>GL_IMAGE_2D_RECT</constant>
776 </entry>
777 <entry align="left">
778 <constant>image2DRect</constant>
779 </entry>
780 </row>
781 <row>
782 <entry align="left">
783 <constant>GL_IMAGE_CUBE</constant>
784 </entry>
785 <entry align="left">
786 <constant>imageCube</constant>
787 </entry>
788 </row>
789 <row>
790 <entry align="left">
791 <constant>GL_IMAGE_BUFFER</constant>
792 </entry>
793 <entry align="left">
794 <constant>imageBuffer</constant>
795 </entry>
796 </row>
797 <row>
798 <entry align="left">
799 <constant>GL_IMAGE_1D_ARRAY</constant>
800 </entry>
801 <entry align="left">
802 <constant>image1DArray</constant>
803 </entry>
804 </row>
805 <row>
806 <entry align="left">
807 <constant>GL_IMAGE_2D_ARRAY</constant>
808 </entry>
809 <entry align="left">
810 <constant>image2DArray</constant>
811 </entry>
812 </row>
813 <row>
814 <entry align="left">
815 <constant>GL_IMAGE_2D_MULTISAMPLE</constant>
816 </entry>
817 <entry align="left">
818 <constant>image2DMS</constant>
819 </entry>
820 </row>
821 <row>
822 <entry align="left">
823 <constant>GL_IMAGE_2D_MULTISAMPLE_ARRAY</constant>
824 </entry>
825 <entry align="left">
826 <constant>image2DMSArray</constant>
827 </entry>
828 </row>
829 <row>
830 <entry align="left">
831 <constant>GL_INT_IMAGE_1D</constant>
832 </entry>
833 <entry align="left">
834 <constant>iimage1D</constant>
835 </entry>
836 </row>
837 <row>
838 <entry align="left">
839 <constant>GL_INT_IMAGE_2D</constant>
840 </entry>
841 <entry align="left">
842 <constant>iimage2D</constant>
843 </entry>
844 </row>
845 <row>
846 <entry align="left">
847 <constant>GL_INT_IMAGE_3D</constant>
848 </entry>
849 <entry align="left">
850 <constant>iimage3D</constant>
851 </entry>
852 </row>
853 <row>
854 <entry align="left">
855 <constant>GL_INT_IMAGE_2D_RECT</constant>
856 </entry>
857 <entry align="left">
858 <constant>iimage2DRect</constant>
859 </entry>
860 </row>
861 <row>
862 <entry align="left">
863 <constant>GL_INT_IMAGE_CUBE</constant>
864 </entry>
865 <entry align="left">
866 <constant>iimageCube</constant>
867 </entry>
868 </row>
869 <row>
870 <entry align="left">
871 <constant>GL_INT_IMAGE_BUFFER</constant>
872 </entry>
873 <entry align="left">
874 <constant>iimageBuffer</constant>
875 </entry>
876 </row>
877 <row>
878 <entry align="left">
879 <constant>GL_INT_IMAGE_1D_ARRAY</constant>
880 </entry>
881 <entry align="left">
882 <constant>iimage1DArray</constant>
883 </entry>
884 </row>
885 <row>
886 <entry align="left">
887 <constant>GL_INT_IMAGE_2D_ARRAY</constant>
888 </entry>
889 <entry align="left">
890 <constant>iimage2DArray</constant>
891 </entry>
892 </row>
893 <row>
894 <entry align="left">
895 <constant>GL_INT_IMAGE_2D_MULTISAMPLE</constant>
896 </entry>
897 <entry align="left">
898 <constant>iimage2DMS</constant>
899 </entry>
900 </row>
901 <row>
902 <entry align="left">
903 <constant>GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY</constant>
904 </entry>
905 <entry align="left">
906 <constant>iimage2DMSArray</constant>
907 </entry>
908 </row>
909 <row>
910 <entry align="left">
911 <constant>GL_UNSIGNED_INT_IMAGE_1D</constant>
912 </entry>
913 <entry align="left">
914 <constant>uimage1D</constant>
915 </entry>
916 </row>
917 <row>
918 <entry align="left">
919 <constant>GL_UNSIGNED_INT_IMAGE_2D</constant>
920 </entry>
921 <entry align="left">
922 <constant>uimage2D</constant>
923 </entry>
924 </row>
925 <row>
926 <entry align="left">
927 <constant>GL_UNSIGNED_INT_IMAGE_3D</constant>
928 </entry>
929 <entry align="left">
930 <constant>uimage3D</constant>
931 </entry>
932 </row>
933 <row>
934 <entry align="left">
935 <constant>GL_UNSIGNED_INT_IMAGE_2D_RECT</constant>
936 </entry>
937 <entry align="left">
938 <constant>uimage2DRect</constant>
939 </entry>
940 </row>
941 <row>
942 <entry align="left">
943 <constant>GL_UNSIGNED_INT_IMAGE_CUBE</constant>
944 </entry>
945 <entry align="left">
946 <constant>uimageCube</constant>
947 </entry>
948 </row>
949 <row>
950 <entry align="left">
951 <constant>GL_UNSIGNED_INT_IMAGE_BUFFER</constant>
952 </entry>
953 <entry align="left">
954 <constant>uimageBuffer</constant>
955 </entry>
956 </row>
957 <row>
958 <entry align="left">
959 <constant>GL_UNSIGNED_INT_IMAGE_1D_ARRAY</constant>
960 </entry>
961 <entry align="left">
962 <constant>uimage1DArray</constant>
963 </entry>
964 </row>
965 <row>
966 <entry align="left">
967 <constant>GL_UNSIGNED_INT_IMAGE_2D_ARRAY</constant>
968 </entry>
969 <entry align="left">
970 <constant>uimage2DArray</constant>
971 </entry>
972 </row>
973 <row>
974 <entry align="left">
975 <constant>GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE</constant>
976 </entry>
977 <entry align="left">
978 <constant>uimage2DMS</constant>
979 </entry>
980 </row>
981 <row>
982 <entry align="left">
983 <constant>GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY</constant>
984 </entry>
985 <entry align="left">
986 <constant>uimage2DMSArray</constant>
987 </entry>
988 </row>
989 <row>
990 <entry align="left">
991 <constant>GL_UNSIGNED_INT_ATOMIC_COUNTER</constant>
992 </entry>
993 <entry align="left">
994 <constant>atomic_uint</constant>
995 </entry>
996 </row>
997 </tbody>
998 </tgroup>
999 </informaltable>
1000 </para>
1001
1002 <para>If one or more elements of an array are active, the name
1003 of the array is returned in <parameter>name</parameter>, the
1004 type is returned in <parameter>type</parameter>, and the
1005 <parameter>size</parameter> parameter returns the highest array
1006 element index used, plus one, as determined by the compiler
1007 and/or linker. Only one active uniform variable will be reported
1008 for a uniform array.</para>
1009
1010 <para>Uniform variables that are declared as structures or
1011 arrays of structures will not be returned directly by this
1012 function. Instead, each of these uniform variables will be
1013 reduced to its fundamental components containing the
1014 &quot;.&quot; and &quot;[]&quot; operators such that each of the
1015 names is valid as an argument to
1016 <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>.
1017 Each of these reduced uniform variables is counted as one active
1018 uniform variable and is assigned an index. A valid name cannot
1019 be a structure, an array of structures, or a subcomponent of a
1020 vector or matrix.</para>
1021
1022 <para>The size of the uniform variable will be returned in
1023 <parameter>size</parameter>. Uniform variables other than arrays
1024 will have a size of 1. Structures and arrays of structures will
1025 be reduced as described earlier, such that each of the names
1026 returned will be a data type in the earlier list. If this
1027 reduction results in an array, the size returned will be as
1028 described for uniform arrays; otherwise, the size returned will
1029 be 1.</para>
1030
1031 <para>The list of active uniform variables may include both
1032 built-in uniform variables (which begin with the prefix
1033 &quot;gl_&quot;) as well as user-defined uniform variable
1034 names.</para>
1035
1036 <para>This function will return as much information as it can
1037 about the specified active uniform variable. If no information
1038 is available, <parameter>length</parameter> will be 0, and
1039 <parameter>name</parameter> will be an empty string. This
1040 situation could occur if this function is called after a link
1041 operation that failed. If an error occurs, the return values
1042 <parameter>length</parameter>, <parameter>size</parameter>,
1043 <parameter>type</parameter>, and <parameter>name</parameter>
1044 will be unmodified.</para>
1045 </refsect1>
1046 <refsect1 id="notes"><title>Notes</title>
1047 <para>
1048 The double types, <constant>GL_DOUBLE</constant>, <constant>GL_DOUBLE_VEC2</constant>,
1049 <constant>GL_DOUBLE_VEC3</constant>, <constant>GL_DOUBLE_VEC4</constant>,
1050 <constant>GL_DOUBLE_MAT2</constant>, <constant>GL_DOUBLE_MAT3</constant>,
1051 <constant>GL_DOUBLE_MAT4</constant>, <constant>GL_DOUBLE_MAT2x3</constant>,
1052 <constant>GL_DOUBLE_MAT2x4</constant>, <constant>GL_DOUBLE_MAT3x2</constant>,
1053 <constant>GL_DOUBLE_MAT3x4</constant>, <constant>GL_DOUBLE_MAT4x2</constant>,
1054 and <constant>GL_DOUBLE_MAT4x3</constant> are only available if the GL
1055 version is 4.1 or higher.
1056 </para>
1057 <para>
1058 The image types,
1059 <constant>GL_IMAGE_1D</constant>,
1060 <constant>GL_IMAGE_2D</constant>,
1061 <constant>GL_IMAGE_3D</constant>,
1062 <constant>GL_IMAGE_2D_RECT</constant>,
1063 <constant>GL_IMAGE_CUBE</constant>,
1064 <constant>GL_IMAGE_BUFFER</constant>,
1065 <constant>GL_IMAGE_1D_ARRAY</constant>,
1066 <constant>GL_IMAGE_2D_ARRAY</constant>,
1067 <constant>GL_IMAGE_2D_MULTISAMPLE</constant>,
1068 <constant>GL_IMAGE_2D_MULTISAMPLE_ARRAY</constant>,
1069 <constant>GL_INT_IMAGE_1D</constant>,
1070 <constant>GL_INT_IMAGE_2D</constant>,
1071 <constant>GL_INT_IMAGE_3D</constant>,
1072 <constant>GL_INT_IMAGE_2D_RECT</constant>,
1073 <constant>GL_INT_IMAGE_CUBE</constant>,
1074 <constant>GL_INT_IMAGE_BUFFER</constant>,
1075 <constant>GL_INT_IMAGE_1D_ARRAY</constant>,
1076 <constant>GL_INT_IMAGE_2D_ARRAY</constant>,
1077 <constant>GL_INT_IMAGE_2D_MULTISAMPLE</constant>,
1078 <constant>GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY</constant>,
1079 <constant>GL_UNSIGNED_INT_IMAGE_1D</constant>,
1080 <constant>GL_UNSIGNED_INT_IMAGE_2D</constant>,
1081 <constant>GL_UNSIGNED_INT_IMAGE_3D</constant>,
1082 <constant>GL_UNSIGNED_INT_IMAGE_2D_RECT</constant>,
1083 <constant>GL_UNSIGNED_INT_IMAGE_CUBE</constant>,
1084 <constant>GL_UNSIGNED_INT_IMAGE_BUFFER</constant>,
1085 <constant>GL_UNSIGNED_INT_IMAGE_1D_ARRAY</constant>,
1086 <constant>GL_UNSIGNED_INT_IMAGE_2D_ARRAY</constant>,
1087 <constant>GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE</constant>,
1088 <constant>GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY</constant>,
1089 and the atomic counter type,
1090 <constant>GL_UNSIGNED_INT_ATOMIC_COUNTER</constant>
1091 are only available if the GL
1092 version is 4.2 or higher.
1093 </para>
1094 </refsect1>
1095 <refsect1 id="errors"><title>Errors</title>
1096 <para><constant>GL_INVALID_VALUE</constant> is generated if
1097 <parameter>program</parameter> is not a value generated by
1098 OpenGL.</para>
1099
1100 <para><constant>GL_INVALID_OPERATION</constant> is generated if
1101 <parameter>program</parameter> is not a program object.</para>
1102
1103 <para><constant>GL_INVALID_VALUE</constant> is generated if
1104 <parameter>index</parameter> is greater than or equal to the
1105 number of active uniform variables in
1106 <parameter>program</parameter>.</para>
1107
1108 <para><constant>GL_INVALID_VALUE</constant> is generated if
1109 <parameter>bufSize</parameter> is less than 0.</para>
1110 </refsect1>
1111 <refsect1 id="associatedgets"><title>Associated Gets</title>
1112 <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
1113 with argument <constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS</constant>,
1114 <constant>GL_MAX_GEOMETRY_UNIFORM_COMPONENTS</constant>,
1115 <constant>GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS</constant>,
1116 <constant>GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS</constant>,
1117 <constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant>.</para>
1118
1119 <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
1120 with argument <constant>GL_ACTIVE_UNIFORMS</constant> or
1121 <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>.</para>
1122
1123 <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
1124 </refsect1>
1125 <refsect1 id="seealso"><title>See Also</title>
1126 <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>,
1127 <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>,
1128 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
1129 <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
1130 <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para>
1131 </refsect1>
1132 <refsect1 id="Copyright"><title>Copyright</title>
1133 <para>
1134 Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
1135 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group
1136 This material may be distributed subject to the terms and conditions set forth in
1137 the Open Publication License, v 1.0, 8 June 1999.
1138 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
1139 </para>
1140 </refsect1>
1141 </refentry>