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