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