Opentk/Source/Bind/Specifications/Docs/glGetTexParameter.xml
2013-12-15 22:32:32 +01:00

418 lines
20 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="glGetTexParameter">
<refentryinfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
<copyright>
<year>2010-2013</year>
<holder>Khronos Group</holder>
</copyright>
</refentryinfo>
<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>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGetTexParameterIiv</function></funcdef>
<paramdef>GLenum <parameter>target</parameter></paramdef>
<paramdef>GLenum <parameter>pname</parameter></paramdef>
<paramdef>GLint * <parameter>params</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGetTexParameterIuiv</function></funcdef>
<paramdef>GLenum <parameter>target</parameter></paramdef>
<paramdef>GLenum <parameter>pname</parameter></paramdef>
<paramdef>GLuint * <parameter>params</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 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_1D</constant>,
<constant>GL_TEXTURE_2D</constant>,
<constant>GL_TEXTURE_1D_ARRAY</constant>,
<constant>GL_TEXTURE_2D_ARRAY</constant>,
<constant>GL_TEXTURE_3D</constant>,
<constant>GL_TEXTURE_RECTANGLE</constant>,
<constant>GL_TEXTURE_CUBE_MAP</constant>, and
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>
are accepted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>pname</parameter></term>
<listitem>
<para>
Specifies the symbolic name of a texture parameter.
<constant>GL_DEPTH_STENCIL_TEXTURE_MODE</constant>,
<constant>GL_TEXTURE_BASE_LEVEL</constant>,
<constant>GL_TEXTURE_BORDER_COLOR</constant>,
<constant>GL_TEXTURE_COMPARE_MODE</constant>,
<constant>GL_TEXTURE_COMPARE_FUNC</constant>,
<constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>,
<constant>GL_TEXTURE_IMMUTABLE_LEVELS</constant>,
<constant>GL_TEXTURE_LOD_BIAS</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_SWIZZLE_RGBA</constant>,
<constant>GL_TEXTURE_VIEW_MIN_LAYER</constant>,
<constant>GL_TEXTURE_VIEW_MIN_LEVEL</constant>,
<constant>GL_TEXTURE_VIEW_NUM_LAYERS</constant>,
<constant>GL_TEXTURE_VIEW_NUM_LEVELS</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 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_1D</constant>,
<constant>GL_TEXTURE_2D</constant>,
<constant>GL_TEXTURE_3D</constant>,
<constant>GL_TEXTURE_1D_ARRAY</constant>,
<constant>GL_TEXTURE_2D_ARRAY</constant>,
<constant>GL_TEXTURE_RECTANGLE</constant>,
<constant>GL_TEXTURE_CUBE_MAP</constant>,
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>
specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle, cube-mapped or cube-mapped array 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_DEPTH_STENCIL_TEXTURE_MODE</constant></term>
<listitem>
<para>
Returns the single-value depth stencil texture mode, a symbolic constant.
The initial value is <constant>GL_DEPTH_COMPONENT</constant>.
</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_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>
<!-- eqn: -1000: -->
<mml:mn>-1000</mml:mn>
</mml:math></inlineequation>.
</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_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_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_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_SWIZZLE_RGBA</constant></term>
<listitem>
<para>
Returns the component swizzle for all channels in a single query.
</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><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><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><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>,
a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_TEXTURE_BORDER_COLOR</constant></term>
<listitem>
<para>
Returns four integer or floating-point numbers that comprise the RGBA color
of the texture border.
Floating-point values are returned in the range
<inlineequation><mml:math>
<!-- eqn: [0,1]: -->
<mml:mfenced open="[" close="]">
<mml:mn>0</mml:mn>
<mml:mn>1</mml:mn>
</mml:mfenced>
</mml:math></inlineequation>.
Integer values are returned as a linear mapping of the internal floating-point
representation such that 1.0 maps to the most positive representable
integer and
<inlineequation><mml:math>
<!-- eqn: -1.0: -->
<mml:mn>-1.0</mml:mn>
</mml:math></inlineequation>
maps to the most negative representable
integer. The initial value is (0, 0, 0, 0).
</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_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_VIEW_MIN_LEVEL</constant></term>
<listitem>
<para>
Returns a single-valued base level of a texture view relative to its parent. The
initial value is 0. See <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_TEXTURE_VIEW_NUM_LEVELS</constant></term>
<listitem>
<para>
Returns a single-valued number of levels of detail of a texture view.
See <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_TEXTURE_VIEW_MIN_LAYER</constant></term>
<listitem>
<para>
Returns a single-valued first level of a texture array view relative to its parent.
See <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_TEXTURE_VIEW_NUM_LAYERS</constant></term>
<listitem>
<para>
Returns a single-valued number of layers in a texture array view.
See <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GL_TEXTURE_IMMUTABLE_LEVELS</constant></term>
<listitem>
<para>
Returns a single-valued number of immutable texture levels in a texture view.
See <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
In addition to the parameters that may be set with <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
<function>glGetTexParameter</function> accepts the following read-only parameters:
</para>
<variablelist>
<varlistentry>
<term><constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant></term>
<listitem>
<para>
Returns non-zero if the texture has an immutable format. Textures become
immutable if their storage is specified with <citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>.
The initial value is <constant>GL_FALSE</constant>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="notes"><title>Notes</title>
<para>
If an error is generated,
no change is made to the contents of <parameter>params</parameter>.
</para>
<para>
<constant>GL_DEPTH_STENCIL_TEXTURE_MODE</constant>, <constant>GL_TEXTURE_VIEW_MIN_LEVEL</constant>,
<constant>GL_TEXTURE_VIEW_NUM_LEVELS</constant>, <constant>GL_TEXTURE_VIEW_MIN_LAYER</constant>,
<constant>GL_TEXTURE_VIEW_NUM_LAYERS</constant> and <constant>GL_TEXTURE_IMMUTABLE_LEVELS</constant> are available only if the GL version is 4.3 or greater.
</para>
</refsect1>
<refsect1 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 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006 Silicon Graphics, Inc.
Copyright <trademark class="copyright"></trademark> 2010-2013 Khronos Group.
This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>