rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glUniformBlockBinding.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="glUniformBlockBinding">\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>glUniformBlockBinding</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glUniformBlockBinding</refname>\r
17 <refpurpose>assign a binding point to 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>glUniformBlockBinding</function></funcdef>\r
23 <paramdef>GLuint <parameter>program</parameter></paramdef>\r
24 <paramdef>GLuint <parameter>uniformBlockIndex</parameter></paramdef>\r
25 <paramdef>GLuint <parameter>uniformBlockBinding</parameter></paramdef>\r
26 </funcprototype>\r
27 </funcsynopsis>\r
28 </refsynopsisdiv>\r
29 <refsect1 id="parameters"><title>Parameters</title>\r
30 <variablelist>\r
31 <varlistentry>\r
32 <term><parameter>program</parameter></term>\r
33 <listitem>\r
34 <para>\r
35 The name of a program object containing the active uniform block whose binding to assign.\r
36 </para>\r
37 </listitem>\r
38 </varlistentry>\r
39 <varlistentry>\r
40 <term><parameter>uniformBlockIndex</parameter></term>\r
41 <listitem>\r
42 <para>\r
43 The index of the active uniform block within <parameter>program</parameter> whose binding to assign.\r
44 </para>\r
45 </listitem>\r
46 </varlistentry>\r
47 <varlistentry>\r
48 <term><parameter>uniformBlockBinding</parameter></term>\r
49 <listitem>\r
50 <para>\r
51 Specifies the binding point to which to bind the uniform block with index <parameter>uniformBlockIndex</parameter> within <parameter>program</parameter>.\r
52 </para>\r
53 </listitem>\r
54 </varlistentry>\r
55 </variablelist>\r
56 </refsect1>\r
57 <refsect1 id="description"><title>Description</title>\r
58 <para>\r
59 Binding points for active uniform blocks are assigned using <function>glUniformBlockBinding</function>. Each of a program's active uniform\r
60 blocks has a corresponding uniform buffer binding point. <parameter>program</parameter> is the name of a program object for which the command\r
61 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been issued in the past.\r
62 </para>\r
63 <para>\r
64 If successful, <function>glUniformBlockBinding</function> specifies that <parameter>program</parameter> will use the data store of the\r
65 buffer object bound to the binding point <parameter>uniformBlockBinding</parameter> to extract the values of the uniforms in the\r
66 uniform block identified by <parameter>uniformBlockIndex</parameter>.\r
67 </para>\r
68 <para>\r
69 When a program object is linked or re-linked, the uniform buffer object binding point assigned to each of its active uniform blocks is reset to zero.\r
70 </para>\r
71 </refsect1>\r
72 <refsect1 id="errors"><title>Errors</title>\r
73 <para>\r
74 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformBlockIndex</parameter> is not an active uniform block index of <parameter>program</parameter>.\r
75 </para>\r
76 <para>\r
77 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformBlockBinding</parameter> is greater than or equal to the value of <constant>GL_MAX_UNIFORM_BUFFER_BINDINGS</constant>.\r
78 </para>\r
79 <para>\r
80 <constant>GL_INVALID_VALUE</constant> is generated <parameter>program</parameter> is not the name of a program object generated by the GL.\r
81 </para>\r
82 </refsect1>\r
83 <refsect1 id="notes"><title>Notes</title>\r
84 <para>\r
85 <function>glUniformBlockBinding</function> is available only if the GL version is 3.1 or greater.\r
86 </para>\r
87 </refsect1>\r
88 <refsect1 id="associatedgets"><title>Associated Gets</title>\r
89 <para>\r
90 <citerefentry><refentrytitle>glGetActiveUniformBlock</refentrytitle></citerefentry> with argument <constant>GL_UNIFORM_BLOCK_BINDING</constant>\r
91 </para>\r
92 </refsect1>\r
93 <refsect1 id="seealso"><title>See Also</title>\r
94 <para>\r
95 <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,\r
96 <citerefentry><refentrytitle>glBindBufferBase</refentrytitle></citerefentry>,\r
97 <citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry>,\r
98 <citerefentry><refentrytitle>glGetActiveUniformBlock</refentrytitle></citerefentry>\r
99 </para>\r
100 </refsect1>\r
101\r
102 <refsect1 id="Copyright"><title>Copyright</title>\r
103 <para>\r
104 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
105 This material may be distributed subject to the terms and conditions set forth in \r
106 the Open Publication License, v 1.0, 8 June 1999.\r
107 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
108 </para>\r
109 </refsect1>\r
110</refentry>\r