<!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="glActiveTexture">
    <info>
        <copyright>
            <year>1991-2006</year>
            <holder>Silicon Graphics, Inc.</holder>
        </copyright>
        <copyright>
            <year>2010-2014</year>
            <holder>Khronos Group</holder>
        </copyright>
    </info>
    <refmeta>
        <refentrytitle>glActiveTexture</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glActiveTexture</refname>
        <refpurpose>select active texture unit</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glActiveTexture</function></funcdef>
                <paramdef>GLenum <parameter>texture</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 xml:id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>texture</parameter></term>
            <listitem>
                <para>
                    Specifies which texture unit to make active. The number
                    of texture units is implementation dependent, but must
                    be at least 80. <parameter>texture</parameter> must be
                    one of
                    <constant>GL_TEXTURE</constant><emphasis>i</emphasis>,
                    where <emphasis>i</emphasis> ranges from zero to the value
                    of
                    <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant>
                    minus one. The initial value is
                    <constant>GL_TEXTURE0</constant>.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="description"><title>Description</title>
        <para>
            <function>glActiveTexture</function> selects which texture unit subsequent texture state calls will
            affect.  The number of texture units an implementation supports is
            implementation dependent, but must be at least 80.
        </para>
    </refsect1>
    <refsect1 xml:id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if
            <parameter>texture</parameter> is not one of
            <constant>GL_TEXTURE</constant><emphasis>i</emphasis>, where
            <emphasis>i</emphasis> ranges from zero to the value of
            <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant> minus
            one.
        </para>
    </refsect1>
    <refsect1 xml:id="associatedgets"><title>Associated Gets</title>
        <para>
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_TEXTURE</constant>, or <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant>.
        </para>
    </refsect1>
    <refsect1 xml:id="versions"><title>Version Support</title>
        <informaltable>
            <tgroup cols="13" align="left">
                <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
                <tbody>
                    <row>
                        <entry><function>glActiveTexture</function></entry>
                        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='20']/*)"/>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
    </refsect1>
    <refsect1 xml:id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>
            <citerefentry><refentrytitle>glIsTexture</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage2DMultisample</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexImage3DMultisample</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
        </para>
    </refsect1>
    <refsect1 xml:id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"/> 1991-2006 Silicon Graphics, Inc.
            Copyright <trademark class="copyright"/> 2010-2014 Khronos Group.
            This document is licensed under the SGI Free Software B License.
            For details, see
            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</link>.
        </para>
    </refsect1>
</refentry>
