<function>glGetActiveUniformBlockName</function> retrieves the name of the active uniform block at <parameter>uniformBlockIndex</parameter>
within <parameter>program</parameter>.
</para>
<para>
<parameter>program</parameter> must be the name of a program object for which the command
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have been called in the past, although it is not required that
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> must have succeeded. The link could have failed because the number
of active uniforms exceeded the limit.
</para>
<para>
<parameter>uniformBlockIndex</parameter> is an active uniform block index of <parameter>program</parameter>, and must be less than the value
of <constant>GL_ACTIVE_UNIFORM_BLOCKS</constant>.
</para>
<para>
Upon success, the name of the uniform block identified by <parameter>unifomBlockIndex</parameter> is returned into
<parameter>uniformBlockName</parameter>. The name is nul-terminated. The actual number of characters written into <parameter>uniformBlockName</parameter>,
excluding the nul terminator, is returned in <parameter>length</parameter>. If <parameter>length</parameter> is <code>NULL</code>, no length is returned.
</para>
<para>
<parameter>bufSize</parameter> contains the maximum number of characters (including the nul terminator) that will be written into
<parameter>uniformBlockName</parameter>.
</para>
<para>
If an error occurs, nothing will be written to <parameter>uniformBlockName</parameter> or <parameter>length</parameter>.
</para>
</refsect1>
<refsect1id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter> is not the name of a program object for which
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past.
</para>
<para>
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformBlockIndex</parameter> is greater than or equal to the value
of <constant>GL_ACTIVE_UNIFORM_BLOCKS</constant> or is not the index of an active uniform block in <parameter>program</parameter>.
</para>
</refsect1>
<refsect1id="notes"><title>Notes</title>
<para>
<function>glGetActiveUniformBlockName</function> is available only if the GL version is 3.1 or greater.