<!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="glGetTexParameter">
    <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>glGetTexParameter</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glGetTexParameter</refname>
        <refpurpose>return texture parameter values</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glGetTexParameterfv</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLenum <parameter>pname</parameter></paramdef>
                <paramdef>GLfloat * <parameter>params</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glGetTexParameteriv</function></funcdef>
                <paramdef>GLenum <parameter>target</parameter></paramdef>
                <paramdef>GLenum <parameter>pname</parameter></paramdef>
                <paramdef>GLint * <parameter>params</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 xml:id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>target</parameter></term>
            <listitem>
                <para>
                    Specifies the symbolic name of the target texture.
                    <constant>GL_TEXTURE_2D</constant>,
                    <constant>GL_TEXTURE_2D_ARRAY</constant>,
                    <constant>GL_TEXTURE_3D</constant>, and
                    <constant>GL_TEXTURE_CUBE_MAP</constant>
                    are accepted.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>pname</parameter></term>
            <listitem>
                <para>
                    Specifies the symbolic name of a texture parameter.
                    <constant>GL_TEXTURE_BASE_LEVEL</constant>,
                    <constant>GL_TEXTURE_COMPARE_FUNC</constant>,
                    <constant>GL_TEXTURE_COMPARE_MODE</constant>,
                    <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>,
                    <constant>GL_TEXTURE_MAG_FILTER</constant>,
                    <constant>GL_TEXTURE_MAX_LEVEL</constant>,
                    <constant>GL_TEXTURE_MAX_LOD</constant>,
                    <constant>GL_TEXTURE_MIN_FILTER</constant>,
                    <constant>GL_TEXTURE_MIN_LOD</constant>,
                    <constant>GL_TEXTURE_SWIZZLE_R</constant>,
                    <constant>GL_TEXTURE_SWIZZLE_G</constant>,
                    <constant>GL_TEXTURE_SWIZZLE_B</constant>,
                    <constant>GL_TEXTURE_SWIZZLE_A</constant>,
                    <constant>GL_TEXTURE_WRAP_S</constant>,
                    <constant>GL_TEXTURE_WRAP_T</constant>, and
                    <constant>GL_TEXTURE_WRAP_R</constant>
                    are accepted.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>params</parameter></term>
            <listitem>
                <para>
                    Returns the texture parameters.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="description"><title>Description</title>
        <para>
            <function>glGetTexParameter</function> returns in <parameter>params</parameter> the value or values of the texture parameter
            specified as <parameter>pname</parameter>.
            <parameter>target</parameter> defines the target texture.
            <constant>GL_TEXTURE_2D</constant>,
            <constant>GL_TEXTURE_3D</constant>,
            <constant>GL_TEXTURE_2D_ARRAY</constant>, and
            <constant>GL_TEXTURE_CUBE_MAP</constant>
            specify two- or three-dimensional, two-dimensional array, or cube-mapped texturing, respectively.
            <parameter>pname</parameter> accepts the same symbols as <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
            with the same interpretations:
        </para>
        <variablelist>
            <varlistentry>
                <term><constant>GL_TEXTURE_BASE_LEVEL</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued base texture mipmap level.  The initial value is 0.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term>
                <listitem>
                    <para>
                        Returns a single-valued texture comparison function, a symbolic constant.  The
                        initial value is <constant>GL_LEQUAL</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term>
                <listitem>
                    <para>
                        Returns a single-valued texture comparison mode, a symbolic constant.  The
                        initial value is <constant>GL_NONE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant></term>
                <listitem>
                    <para>
                        Returns a single-value boolean representing the immutability of the texture format and size.
                        initial value is <constant>GL_FALSE</constant>. See <citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_MAG_FILTER</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued texture magnification filter,
                        a symbolic constant. The initial value is <constant>GL_LINEAR</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_MAX_LEVEL</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued maximum texture mipmap array level.  The initial
                        value is 1000.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_MAX_LOD</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued texture maximum level-of-detail value. The
                        initial value is 1000.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_MIN_FILTER</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued texture minification filter,
                        a symbolic constant. The initial value is <constant>GL_NEAREST_MIPMAP_LINEAR</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_MIN_LOD</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued texture minimum level-of-detail value.  The
                        initial value is
                        <inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
                            <!-- eqn: -1000: -->
                            <mml:mn>-1000</mml:mn>
                        </mml:math></inlineequation>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_SWIZZLE_R</constant></term>
                <listitem>
                    <para>
                        Returns the red component swizzle. The initial value is <constant>GL_RED</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_SWIZZLE_G</constant></term>
                <listitem>
                    <para>
                        Returns the green component swizzle. The initial value is <constant>GL_GREEN</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_SWIZZLE_B</constant></term>
                <listitem>
                    <para>
                        Returns the blue component swizzle. The initial value is <constant>GL_BLUE</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_SWIZZLE_A</constant></term>
                <listitem>
                    <para>
                        Returns the alpha component swizzle. The initial value is <constant>GL_ALPHA</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_WRAP_S</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued wrapping function for texture coordinate
                        <inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>,
                        a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_WRAP_T</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued wrapping function for texture coordinate
                        <inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>,
                        a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term><constant>GL_TEXTURE_WRAP_R</constant></term>
                <listitem>
                    <para>
                        Returns the single-valued wrapping function for texture coordinate
                        <inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>,
                        a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="notes"><title>Notes</title>
        <para>
            If an error is generated,
            no change is made to the contents of <parameter>params</parameter>.
        </para>
    </refsect1>
    <refsect1 xml:id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
            accepted value.
        </para>
    </refsect1>
    <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>glGetTexParameterfv</function></entry>
                        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='es20']/*)"/>
                    </row>
                    <row>
                        <entry><function>glGetTexParameteriv</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>
        <para>
            <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
                        <citerefentry><refentrytitle>glTexStorage2D</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>
