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="glGetUniformBlockIndex"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetUniformBlockIndex</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetUniformBlockIndex</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>GLuint <function>glGetUniformBlockIndex</function></funcdef> | |
23 | <paramdef>GLuint <parameter>program</parameter></paramdef> | |
24 | <paramdef>const GLchar *<parameter>uniformBlockName</parameter></paramdef> | |
25 | </funcprototype> | |
26 | </funcsynopsis> | |
27 | </refsynopsisdiv> | |
28 | <refsect1 id="parameters"><title>Parameters</title> | |
29 | <variablelist> | |
30 | <varlistentry> | |
31 | <term><parameter>program</parameter></term> | |
32 | <listitem> | |
33 | <para> | |
34 | Specifies the name of a program containing the uniform block. | |
35 | </para> | |
36 | </listitem> | |
37 | </varlistentry> | |
38 | <varlistentry> | |
39 | <term><parameter>uniformBlockName</parameter></term> | |
40 | <listitem> | |
41 | <para> | |
42 | Specifies the address an array of characters to containing the name of the uniform block whose index to retrieve. | |
43 | </para> | |
44 | </listitem> | |
45 | </varlistentry> | |
46 | </variablelist> | |
47 | </refsect1> | |
48 | <refsect1 id="description"><title>Description</title> | |
49 | <para> | |
50 | <function>glGetUniformBlockIndex</function> retrieves the index of a uniform block within <parameter>program</parameter>. | |
51 | </para> | |
52 | <para> | |
53 | <parameter>program</parameter> must be the name of a program object for which the command | |
54 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have been called in the past, although it is not required that | |
55 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have succeeded. The link could have failed because the number | |
56 | of active uniforms exceeded the limit. | |
57 | </para> | |
58 | <para> | |
59 | <parameter>uniformBlockName</parameter> must contain a nul-terminated string specifying the name of the uniform block. | |
60 | </para> | |
61 | <para> | |
62 | <function>glGetUniformBlockIndex</function> returns the uniform block index for the uniform block named <parameter>uniformBlockName</parameter> | |
63 | of <parameter>program</parameter>. If <parameter>uniformBlockName</parameter> does not identify an active uniform block of <parameter>program</parameter>, | |
64 | <function>glGetUniformBlockIndex</function> returns the special identifier, <constant>GL_INVALID_INDEX</constant>. Indices of the active uniform | |
65 | blocks of a program are assigned in consecutive order, beginning with zero. | |
66 | </para> | |
67 | </refsect1> | |
68 | <refsect1 id="errors"><title>Errors</title> | |
69 | <para> | |
70 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> is not the name of a program object for which | |
71 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past. | |
72 | </para> | |
73 | </refsect1> | |
74 | <refsect1 id="notes"><title>Notes</title> | |
75 | <para> | |
76 | <function>glGetUniformBlockIndex</function> is available only if the GL version is 3.1 or greater. | |
77 | </para> | |
78 | </refsect1> | |
79 | <refsect1 id="seealso"><title>See Also</title> | |
80 | <para> | |
81 | <citerefentry><refentrytitle>glGetActiveUniformBlockName</refentrytitle></citerefentry>, | |
82 | <citerefentry><refentrytitle>glGetActiveUniformBlock</refentrytitle></citerefentry>, | |
83 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> | |
84 | </para> | |
85 | </refsect1> | |
86 | <refsect1 id="Copyright"><title>Copyright</title> | |
87 | <para> | |
88 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. | |
89 | This material may be distributed subject to the terms and conditions set forth in | |
90 | the Open Publication License, v 1.0, 8 June 1999. | |
91 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
92 | </para> | |
93 | </refsect1> | |
94 | </refentry> |