rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glGetUniformIndices.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="glGetUniformIndices">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetUniformIndices</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetUniformIndices</refname>
17 <refpurpose>retrieve the index of a named uniform block</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetUniformIndices</function></funcdef>
23 <paramdef>GLuint <parameter>program</parameter></paramdef>
24 <paramdef>GLsizei <parameter>uniformCount</parameter></paramdef>
25 <paramdef>const GLchar **<parameter>uniformNames</parameter></paramdef>
26 <paramdef>GLuint *<parameter>uniformIndices</parameter></paramdef>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>program</parameter></term>
34 <listitem>
35 <para>
36 Specifies the name of a program containing uniforms whose indices to query.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>uniformCount</parameter></term>
42 <listitem>
43 <para>
44 Specifies the number of uniforms whose indices to query.
45 </para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>uniformNames</parameter></term>
50 <listitem>
51 <para>
52 Specifies the address of an array of pointers to buffers containing the names of the queried uniforms.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>uniformIndices</parameter></term>
58 <listitem>
59 <para>
60 Specifies the address of an array that will receive the indices of the uniforms.
61 </para>
62 </listitem>
63 </varlistentry>
64 </variablelist>
65 </refsect1>
66 <refsect1 id="description"><title>Description</title>
67 <para>
68 <function>glGetUniformIndices</function> retrieves the indices of a number of uniforms within <parameter>program</parameter>.
69 </para>
70 <para>
71 <parameter>program</parameter> must be the name of a program object for which the command
72 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have been called in the past, although it is not required that
73 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have succeeded. The link could have failed because the number
74 of active uniforms exceeded the limit.
75 </para>
76 <para>
77 <parameter>uniformCount</parameter> indicates both the number of elements in the array of names <parameter>uniformNames</parameter> and the
78 number of indices that may be written to <parameter>uniformIndices</parameter>.
79 </para>
80 <para>
81 <parameter>uniformNames</parameter> contains a list of <parameter>uniformCount</parameter> name strings identifying the uniform names to be
82 queried for indices. For each name string in <parameter>uniformNames</parameter>, the index assigned to the active uniform of that name will
83 be written to the corresponding element of <parameter>uniformIndices</parameter>. If a string in <parameter>uniformNames</parameter> is not
84 the name of an active uniform, the special value <constant>GL_INVALID_INDEX</constant> will be written to the corresponding element of
85 <parameter>uniformIndices</parameter>.
86 </para>
87 <para>
88 If an error occurs, nothing is written to <parameter>uniformIndices</parameter>.
89 </para>
90 </refsect1>
91 <refsect1 id="errors"><title>Errors</title>
92 <para>
93 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> is not the name of a program object for which
94 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past.
95 </para>
96 </refsect1>
97 <refsect1 id="notes"><title>Notes</title>
98 <para>
99 <function>glGetUniformIndices</function> is available only if the GL version is 3.1 or greater.
100 </para>
101 </refsect1>
102 <refsect1 id="seealso"><title>See Also</title>
103 <para>
104 <citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>,
105 <citerefentry><refentrytitle>glGetActiveUniformName</refentrytitle></citerefentry>,
106 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
107 </para>
108 </refsect1>
109 <refsect1 id="Copyright"><title>Copyright</title>
110 <para>
111 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
112 This material may be distributed subject to the terms and conditions set forth in
113 the Open Publication License, v 1.0, 8 June 1999.
114 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
115 </para>
116 </refsect1>
117 </refentry>