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="glGetActiveUniformBlockName"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetActiveUniformBlockName</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetActiveUniformBlockName</refname> | |
17 | <refpurpose>retrieve the name of an active uniform block</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetActiveUniformBlockName</function></funcdef> | |
23 | <paramdef>GLuint <parameter>program</parameter></paramdef> | |
24 | <paramdef>GLuint <parameter>uniformBlockIndex</parameter></paramdef> | |
25 | <paramdef>GLsizei <parameter>bufSize</parameter></paramdef> | |
26 | <paramdef>GLsizei *<parameter>length</parameter></paramdef> | |
27 | <paramdef>GLchar *<parameter>uniformBlockName</parameter></paramdef> | |
28 | </funcprototype> | |
29 | </funcsynopsis> | |
30 | </refsynopsisdiv> | |
31 | <refsect1 id="parameters"><title>Parameters</title> | |
32 | <variablelist> | |
33 | <varlistentry> | |
34 | <term><parameter>program</parameter></term> | |
35 | <listitem> | |
36 | <para> | |
37 | Specifies the name of a program containing the uniform block. | |
38 | </para> | |
39 | </listitem> | |
40 | </varlistentry> | |
41 | <varlistentry> | |
42 | <term><parameter>uniformBlockIndex</parameter></term> | |
43 | <listitem> | |
44 | <para> | |
45 | Specifies the index of the uniform block within <parameter>program</parameter>. | |
46 | </para> | |
47 | </listitem> | |
48 | </varlistentry> | |
49 | <varlistentry> | |
50 | <term><parameter>bufSize</parameter></term> | |
51 | <listitem> | |
52 | <para> | |
53 | Specifies the size of the buffer addressed by <parameter>uniformBlockName</parameter>. | |
54 | </para> | |
55 | </listitem> | |
56 | </varlistentry> | |
57 | <varlistentry> | |
58 | <term><parameter>length</parameter></term> | |
59 | <listitem> | |
60 | <para> | |
61 | Specifies the address of a variable to receive the number of characters that were written to <parameter>uniformBlockName</parameter>. | |
62 | </para> | |
63 | </listitem> | |
64 | </varlistentry> | |
65 | <varlistentry> | |
66 | <term><parameter>uniformBlockName</parameter></term> | |
67 | <listitem> | |
68 | <para> | |
69 | Specifies the address an array of characters to receive the name of the uniform block at <parameter>uniformBlockIndex</parameter>. | |
70 | </para> | |
71 | </listitem> | |
72 | </varlistentry> | |
73 | </variablelist> | |
74 | </refsect1> | |
75 | <refsect1 id="description"><title>Description</title> | |
76 | <para> | |
77 | <function>glGetActiveUniformBlockName</function> retrieves the name of the active uniform block at <parameter>uniformBlockIndex</parameter> | |
78 | within <parameter>program</parameter>. | |
79 | </para> | |
80 | <para> | |
81 | <parameter>program</parameter> must be the name of a program object for which the command | |
82 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have been called in the past, although it is not required that | |
83 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have succeeded. The link could have failed because the number | |
84 | of active uniforms exceeded the limit. | |
85 | </para> | |
86 | <para> | |
87 | <parameter>uniformBlockIndex</parameter> is an active uniform block index of <parameter>program</parameter>, and must be less than the value | |
88 | of <constant>GL_ACTIVE_UNIFORM_BLOCKS</constant>. | |
89 | </para> | |
90 | <para> | |
91 | Upon success, the name of the uniform block identified by <parameter>unifomBlockIndex</parameter> is returned into | |
92 | <parameter>uniformBlockName</parameter>. The name is nul-terminated. The actual number of characters written into <parameter>uniformBlockName</parameter>, | |
93 | excluding the nul terminator, is returned in <parameter>length</parameter>. If <parameter>length</parameter> is <code>NULL</code>, no length is returned. | |
94 | </para> | |
95 | <para> | |
96 | <parameter>bufSize</parameter> contains the maximum number of characters (including the nul terminator) that will be written into | |
97 | <parameter>uniformBlockName</parameter>. | |
98 | </para> | |
99 | <para> | |
100 | If an error occurs, nothing will be written to <parameter>uniformBlockName</parameter> or <parameter>length</parameter>. | |
101 | </para> | |
102 | </refsect1> | |
103 | <refsect1 id="errors"><title>Errors</title> | |
104 | <para> | |
105 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> is not the name of a program object for which | |
106 | <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past. | |
107 | </para> | |
108 | <para> | |
109 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformBlockIndex</parameter> is greater than or equal to the value | |
110 | of <constant>GL_ACTIVE_UNIFORM_BLOCKS</constant> or is not the index of an active uniform block in <parameter>program</parameter>. | |
111 | </para> | |
112 | </refsect1> | |
113 | <refsect1 id="notes"><title>Notes</title> | |
114 | <para> | |
115 | <function>glGetActiveUniformBlockName</function> is available only if the GL version is 3.1 or greater. | |
116 | </para> | |
117 | </refsect1> | |
118 | <refsect1 id="seealso"><title>See Also</title> | |
119 | <para> | |
120 | <citerefentry><refentrytitle>glGetActiveUniformBlock</refentrytitle></citerefentry>, | |
121 | <citerefentry><refentrytitle>glGetUniformBlockIndex</refentrytitle></citerefentry> | |
122 | </para> | |
123 | </refsect1> | |
124 | <refsect1 id="Copyright"><title>Copyright</title> | |
125 | <para> | |
126 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. | |
127 | This material may be distributed subject to the terms and conditions set forth in | |
128 | the Open Publication License, v 1.0, 8 June 1999. | |
129 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
130 | </para> | |
131 | </refsect1> | |
132 | </refentry> |