mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 07:55:39 +00:00
132 lines
6.9 KiB
XML
132 lines
6.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
|
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
|
<refentry id="glGetActiveUniformName">
|
|
<refentryinfo>
|
|
<copyright>
|
|
<year>2010-2013</year>
|
|
<holder>Khronos Group</holder>
|
|
</copyright>
|
|
</refentryinfo>
|
|
<refmeta>
|
|
<refentrytitle>glGetActiveUniformName</refentrytitle>
|
|
<manvolnum>3G</manvolnum>
|
|
</refmeta>
|
|
<refnamediv>
|
|
<refname>glGetActiveUniformName</refname>
|
|
<refpurpose>query the name of an active uniform</refpurpose>
|
|
</refnamediv>
|
|
<refsynopsisdiv><title>C Specification</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>void <function>glGetActiveUniformName</function></funcdef>
|
|
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
|
<paramdef>GLuint <parameter>uniformIndex</parameter></paramdef>
|
|
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
|
<paramdef>GLsizei *<parameter>length</parameter></paramdef>
|
|
<paramdef>GLchar *<parameter>uniformName</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
</refsynopsisdiv>
|
|
<refsect1 id="parameters"><title>Parameters</title>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>program</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the program containing the active uniform index <parameter>uniformIndex</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>uniformIndex</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the index of the active uniform whose name to query.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>bufSize</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the size of the buffer, in units of <code>GLchar</code>, of the buffer whose address is specified in <parameter>uniformName</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>length</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by <parameter>uniformName</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>uniformName</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the address of a buffer into which the GL will place the name of the active uniform at <parameter>uniformIndex</parameter> within <parameter>program</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1 id="description"><title>Description</title>
|
|
<para>
|
|
<function>glGetActiveUniformName</function> returns the name of the active uniform at <parameter>uniformIndex</parameter> within <parameter>program</parameter>.
|
|
If <parameter>uniformName</parameter> is not <code>NULL</code>, up to <parameter>bufSize</parameter> characters (including a nul-terminator) will be written into
|
|
the array whose address is specified by <parameter>uniformName</parameter>. If <parameter>length</parameter> is not <code>NULL</code>, the number of characters
|
|
that were (or would have been) written into <parameter>uniformName</parameter> (not including the nul-terminator) will be placed in the variable whose address
|
|
is specified in <parameter>length</parameter>. If <parameter>length</parameter> is <code>NULL</code>, no length is returned. The length of the longest uniform
|
|
name in <parameter>program</parameter> is given by the value of <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>, which can be queried with
|
|
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.
|
|
</para>
|
|
<para>
|
|
If <function>glGetActiveUniformName</function> is not successful, nothing is written to <parameter>length</parameter> or <parameter>uniformName</parameter>.
|
|
</para>
|
|
<para>
|
|
<parameter>program</parameter> must be the name of a program for which the command <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
|
has been issued in the past. It is not necessary for <parameter>program</parameter> to have been linked successfully. The link could have failed because
|
|
the number of active uniforms exceeded the limit.
|
|
</para>
|
|
<para>
|
|
<parameter>uniformIndex</parameter> must be an active uniform
|
|
index of the program <parameter>program</parameter>, in the
|
|
range zero to the value of
|
|
<constant>GL_ACTIVE_UNIFORMS</constant> minus one. The value of
|
|
<constant>GL_ACTIVE_UNIFORMS</constant> can be queried with
|
|
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="errors"><title>Errors</title>
|
|
<para>
|
|
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>uniformIndex</parameter> is greater than or equal to the value
|
|
of <constant>GL_ACTIVE_UNIFORMS</constant>.
|
|
</para>
|
|
<para>
|
|
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is negative.
|
|
</para>
|
|
<para>
|
|
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of a program object for which
|
|
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been issued.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="seealso"><title>See Also</title>
|
|
<para>
|
|
<citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glGetUniformIndices</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="Copyright"><title>Copyright</title>
|
|
<para>
|
|
Copyright <trademark class="copyright"></trademark> 2010-2013 Khronos Group.
|
|
This material may be distributed subject to the terms and conditions set forth in
|
|
the Open Publication License, v 1.0, 8 June 1999.
|
|
<ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|