2014-03-28 19:06:55 +00:00
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>
<!-- Converted by db4 - upgrade version 1.1 -->
<refentry xmlns= "http://docbook.org/ns/docbook" version= "5.0" xml:id= "glUniformBlockBinding" >
<info >
2013-11-03 11:43:50 +00:00
<copyright >
<year > 2010-2013</year>
<holder > Khronos Group</holder>
</copyright>
2014-03-28 19:06:55 +00:00
</info>
2013-10-10 23:58:54 +00:00
<refmeta >
<refentrytitle > glUniformBlockBinding</refentrytitle>
<manvolnum > 3G</manvolnum>
</refmeta>
<refnamediv >
<refname > glUniformBlockBinding</refname>
<refpurpose > assign a binding point to an active uniform block</refpurpose>
</refnamediv>
<refsynopsisdiv > <title > C Specification</title>
<funcsynopsis >
<funcprototype >
<funcdef > void <function > glUniformBlockBinding</function> </funcdef>
<paramdef > GLuint <parameter > program</parameter> </paramdef>
<paramdef > GLuint <parameter > uniformBlockIndex</parameter> </paramdef>
<paramdef > GLuint <parameter > uniformBlockBinding</parameter> </paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "parameters" > <title > Parameters</title>
2013-10-10 23:58:54 +00:00
<variablelist >
<varlistentry >
<term > <parameter > program</parameter> </term>
<listitem >
<para >
The name of a program object containing the active uniform block whose binding to assign.
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <parameter > uniformBlockIndex</parameter> </term>
<listitem >
<para >
The index of the active uniform block within <parameter > program</parameter> whose binding to assign.
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <parameter > uniformBlockBinding</parameter> </term>
<listitem >
<para >
Specifies the binding point to which to bind the uniform block with index <parameter > uniformBlockIndex</parameter> within <parameter > program</parameter> .
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "description" > <title > Description</title>
2013-10-10 23:58:54 +00:00
<para >
Binding points for active uniform blocks are assigned using <function > glUniformBlockBinding</function> . Each of a program's active uniform
blocks has a corresponding uniform buffer binding point. <parameter > program</parameter> is the name of a program object for which the command
<citerefentry > <refentrytitle > glLinkProgram</refentrytitle> </citerefentry> has been issued in the past.
</para>
<para >
If successful, <function > glUniformBlockBinding</function> specifies that <parameter > program</parameter> will use the data store of the
buffer object bound to the binding point <parameter > uniformBlockBinding</parameter> to extract the values of the uniforms in the
uniform block identified by <parameter > uniformBlockIndex</parameter> .
</para>
<para >
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.
</para>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "errors" > <title > Errors</title>
2013-10-10 23:58:54 +00:00
<para >
<constant > GL_INVALID_VALUE</constant> is generated if <parameter > uniformBlockIndex</parameter> is not an active uniform block index of <parameter > program</parameter> .
</para>
<para >
<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> .
</para>
<para >
2013-10-23 18:17:08 +00:00
<constant > GL_INVALID_VALUE</constant> is generated if <parameter > program</parameter> is not the name of a program object generated by the GL.
2013-10-10 23:58:54 +00:00
</para>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "notes" > <title > Notes</title>
2013-10-10 23:58:54 +00:00
<para >
<function > glUniformBlockBinding</function> is available only if the GL version is 3.1 or greater.
</para>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "associatedgets" > <title > Associated Gets</title>
2013-10-10 23:58:54 +00:00
<para >
<citerefentry > <refentrytitle > glGetActiveUniformBlock</refentrytitle> </citerefentry> with argument <constant > GL_UNIFORM_BLOCK_BINDING</constant>
</para>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "seealso" > <title > See Also</title>
2013-10-10 23:58:54 +00:00
<para >
<citerefentry > <refentrytitle > glLinkProgram</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glBindBufferBase</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glBindBufferRange</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glGetActiveUniformBlock</refentrytitle> </citerefentry>
</para>
</refsect1>
2014-03-28 19:06:55 +00:00
<refsect1 xml:id= "Copyright" > <title > Copyright</title>
2013-10-10 23:58:54 +00:00
<para >
2014-03-28 19:06:55 +00:00
Copyright <trademark class= "copyright" /> 2010-2013 Khronos Group.
2013-11-03 11:43:50 +00:00
This material may be distributed subject to the terms and conditions set forth in
2013-10-10 23:58:54 +00:00
the Open Publication License, v 1.0, 8 June 1999.
2014-03-28 19:06:55 +00:00
<link xmlns:xlink= "http://www.w3.org/1999/xlink" xlink:href= "http://opencontent.org/openpub/" > http://opencontent.org/openpub/</link> .
2013-10-10 23:58:54 +00:00
</para>
</refsect1>
</refentry>