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