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="glGetAttribLocation">
|
2009-03-08 00:46:58 +00:00
|
|
|
<refmeta>
|
2013-11-03 11:43:50 +00:00
|
|
|
<refentrytitle>glGetAttribLocation</refentrytitle>
|
|
|
|
<manvolnum>3G</manvolnum>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
2013-11-03 11:43:50 +00:00
|
|
|
<refname>glGetAttribLocation</refname>
|
|
|
|
<refpurpose>Returns the location of an attribute variable</refpurpose>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv><title>C Specification</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>GLint <function>glGetAttribLocation</function></funcdef>
|
|
|
|
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
|
|
|
<paramdef>const GLchar *<parameter>name</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refsynopsisdiv>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="parameters"><title>Parameters</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>program</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Specifies the program object to be
|
|
|
|
queried.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>name</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Points to a null terminated string containing
|
|
|
|
the name of the attribute variable whose location is
|
|
|
|
to be queried.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="description"><title>Description</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><function>glGetAttribLocation</function> queries the
|
|
|
|
previously linked program object specified by
|
|
|
|
<parameter>program</parameter> for the attribute variable
|
|
|
|
specified by <parameter>name</parameter> and returns the index
|
|
|
|
of the generic vertex attribute that is bound to that attribute
|
|
|
|
variable. If <parameter>name</parameter> is a matrix attribute
|
|
|
|
variable, the index of the first column of the matrix is
|
|
|
|
returned. If the named attribute variable is not an active
|
|
|
|
attribute in the specified program object or if
|
|
|
|
<parameter>name</parameter> starts with the reserved prefix
|
|
|
|
"gl_", a value of -1 is returned.</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
|
2010-11-21 14:34:29 +00:00
|
|
|
<para>The association between an attribute variable name and a
|
|
|
|
generic attribute index can be specified at any time by calling
|
|
|
|
<citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>.
|
|
|
|
Attribute bindings do not go into effect until
|
|
|
|
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
|
|
|
is called. After a program object has been linked successfully,
|
|
|
|
the index values for attribute variables remain fixed until the
|
|
|
|
next link command occurs. The attribute values can only be
|
|
|
|
queried after a link if the link was successful.
|
|
|
|
<function>glGetAttribLocation</function> returns the binding
|
|
|
|
that actually went into effect the last time
|
|
|
|
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
|
|
|
was called for the specified program object. Attribute bindings
|
|
|
|
that have been specified since the last link operation are not
|
|
|
|
returned by <function>glGetAttribLocation</function>.</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="errors"><title>Errors</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><constant>GL_INVALID_OPERATION</constant> is generated if
|
|
|
|
<parameter>program</parameter> is not a value generated by
|
|
|
|
OpenGL.</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><constant>GL_INVALID_OPERATION</constant> is generated if
|
|
|
|
<parameter>program</parameter> is not a program object.</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><constant>GL_INVALID_OPERATION</constant> is generated if
|
|
|
|
<parameter>program</parameter> has not been successfully
|
|
|
|
linked.</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="associatedgets"><title>Associated Gets</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
|
|
|
|
with argument <parameter>program</parameter> and the index of an
|
|
|
|
active attribute</para>
|
2009-03-08 00:46:58 +00:00
|
|
|
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="versions">
|
|
|
|
<title>API Version Support</title>
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3" align="left">
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry><function>glGetAttribLocation</function></entry>
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='es20']/*)"/>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 xml:id="seealso"><title>See Also</title>
|
2010-11-21 14:34:29 +00:00
|
|
|
<para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
|
2014-03-28 19:06:55 +00:00
|
|
|
<citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry>,
|
2010-11-21 14:34:29 +00:00
|
|
|
<citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
|
2009-03-08 00:46:58 +00:00
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="Copyright"><title>Copyright</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
2014-03-28 19:06:55 +00:00
|
|
|
Copyright <trademark class="copyright"/> 2003-2005 3Dlabs Inc. Ltd.
|
|
|
|
This material may be distributed subject to the terms and conditions set forth in
|
2009-03-08 00:46:58 +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>.
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|