1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glGetTexParameter</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glGetTexLevelParameter.3G.xml" title="glGetTexLevelParameter"/><link rel="next" href="glHint.3G.xml" title="glHint"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glGetTexParameter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glGetTexLevelParameter.3G.xml">Prev</a></td><th width="60%" align="center">GL</th><td width="20%" align="right"><a accesskey="n" href="glHint.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glGetTexParameter.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glGetTexParameter.3G-name"/><h2>Name</h2><p>glGetTexParameterfv, glGetTexParameteriv — return texture parameter values</p></div><div class="refsynopsisdiv"><a name="glGetTexParameter.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glGetTexParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, GLfloat*<i><tt>params</tt></i>);</code></td></tr><tr><td valign="top"><code>void<tt>glGetTexParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, GLint*<i><tt>params</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glGetTexParameter.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glGetTexParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) →<tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glGetTexParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) →<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glGetTexParameter.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
Specifies the symbolic name of the target texture.
<tt>GL_TEXTURE_1D</tt>,<tt>GL_TEXTURE_2D</tt>, and
<tt>GL_TEXTURE_3D</tt> are accepted.
</dd><dt><span class="term"><i><tt>pname</tt></i></span></dt><dd>
Specifies the symbolic name of a texture parameter. <tt>GL_TEXTURE_MAG_FILTER</tt>,
<tt>GL_TEXTURE_MIN_FILTER</tt>, <tt>GL_TEXTURE_MIN_LOD</tt>,
<tt>GL_TEXTURE_MAX_LOD</tt>, <tt>GL_TEXTURE_BASE_LEVEL</tt>,
<tt>GL_TEXTURE_MAX_LEVEL</tt>, <tt>GL_TEXTURE_WRAP_S</tt>,
<tt>GL_TEXTURE_WRAP_T</tt>, <tt>GL_TEXTURE_WRAP_R</tt>,
<tt>GL_TEXTURE_BORDER_COLOR</tt>, <tt>GL_TEXTURE_PRIORITY</tt>, and
<tt>GL_TEXTURE_RESIDENT</tt> are accepted.
</dd><dt><span class="term"><i><tt>params</tt></i></span></dt><dd>
Returns the texture parameters.
</dd></dl></div></div><div class="refsect1" lang="en"><a name="glGetTexParameter.3G-description"/><h2>Description</h2><p>
<tt>glGetTexParameter</tt> returns in <i><tt>params</tt></i> the value or values
of the texture parameter specified as <i><tt>pname</tt></i>. <i><tt>target</tt></i> defines the target
texture, either <tt>GL_TEXTURE_1D</tt>, <tt>GL_TEXTURE_2D</tt>, or
<tt>GL_TEXTURE_3D</tt> to specify one-, two-, or three-dimensional texturing. <i><tt>pname</tt></i>
accepts the same symbols as <tt>glTexParameter</tt>, with the same interpretations:
</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_TEXTURE_MAG_FILTER</tt></span></dt><dd>
Returns the single-valued texture magnification filter, a symbolic constant. The initial value is
<tt>GL_LINEAR</tt>.
</dd><dt><span class="term"><tt>GL_TEXTURE_MIN_FILTER</tt></span></dt><dd>
Returns the single-valued texture minification filter, a symbolic constant. The initial value is
<tt>GL_NEAREST_MIPMAP_LINEAR</tt>.
</dd><dt><span class="term"><tt>GL_TEXTURE_MIN_LOD</tt></span></dt><dd>
Returns the single-valued texture minimum level-of-detail value. The initial value is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mn>-1000</mml:mn>
</mml:math>.
</dd><dt><span class="term"><tt>GL_TEXTURE_MAX_LOD</tt></span></dt><dd>
Returns the single-valued texture maximum level-of-detail value. The initial value is 1000.
</dd><dt><span class="term"><tt>GL_TEXTURE_BASE_LEVEL</tt></span></dt><dd>
Returns the single-valued base texture mipmap level. The initial value is 0.
</dd><dt><span class="term"><tt>GL_TEXTURE_MAX_LEVEL</tt></span></dt><dd>
Returns the single-valued maximum texture mipmap array level. The initial value is 1000.
</dd><dt><span class="term"><tt>GL_TEXTURE_WRAP_S</tt></span></dt><dd>
Returns the single-valued wrapping function for texture coordinate <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>s</mml:mi>
</mml:math>, a symbolic constant. The initial value is <tt>GL_REPEAT</tt>.
</dd><dt><span class="term"><tt>GL_TEXTURE_WRAP_T</tt></span></dt><dd>
Returns the single-valued wrapping function for texture coordinate <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>t</mml:mi>
</mml:math>, a symbolic constant. The initial value is <tt>GL_REPEAT</tt>.
</dd><dt><span class="term"><tt>GL_TEXTURE_WRAP_R</tt></span></dt><dd>
Returns the single-valued wrapping function for texture coordinate <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>r</mml:mi>
</mml:math>, a symbolic constant. The initial value is <tt>GL_REPEAT</tt>.
</dd><dt><span class="term"><tt>GL_TEXTURE_BORDER_COLOR</tt></span></dt><dd>
Returns four integer or floating-point numbers that comprise the RGBA color of the texture border.
Floating-point values are returned in the range [0, 1]. 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 -1.0 maps to the most negative representable integer. The initial value is (0, 0, 0, 0).
</dd><dt><span class="term"><tt>GL_TEXTURE_PRIORITY</tt></span></dt><dd>
Returns the residence priority of the target texture (or the named texture bound to it). The initial value
is 1. See <a href="glPrioritizeTextures.3G.xml"><tt>glPrioritizeTextures</tt></a>.
</dd><dt><span class="term"><tt>GL_TEXTURE_RESIDENT</tt></span></dt><dd>
Returns the residence status of the target texture. If the value returned in <i><tt>params</tt></i>
is <tt>GL_TRUE</tt>, the texture is resident in texture memory. See <a href="glAreTexturesResident.3G.xml"><tt>glAreTexturesResident</tt></a>.
</dd></dl></div></div><div class="refsect1" lang="en"><a name="glGetTexParameter.3G-notes"/><h2>Notes</h2><p>
<tt>GL_TEXTURE_PRIORITY</tt> and <tt>GL_TEXTURE_RESIDENT</tt> are available only if the GL
version is 1.1 or greater.
</p><p>
<tt>GL_TEXTURE_3D</tt>, <tt>GL_TEXTURE_MIN_LOD</tt>, <tt>GL_TEXTURE_MAX_LOD</tt>,
<tt>GL_TEXTURE_BASE_LEVEL</tt>, <tt>GL_TEXTURE_MAX_LEVEL</tt>, and
<tt>GL_TEXTURE_WRAP_R</tt> are available only if the GL version is 1.2 or greater.
</p><p>
If an error is generated, no change is made to the contents of <i><tt>params</tt></i>.
</p></div><div class="refsect1" lang="en"><a name="glGetTexParameter.3G-errors"/><h2>Errors</h2><p>
<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>target</tt></i> or <i><tt>pname</tt></i> is
not an accepted value.
</p><p>
<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glGetTexParameter</tt> is
executed between the execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of
<a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
</p></div><div class="refsect1" lang="en"><a name="glGetTexParameter.3G-see_also"/><h2>See Also</h2><p>
<span class="simplelist"><a href="glAreTexturesResident.3G.xml">glAreTexturesResident</a>, <a href="glPrioritizeTextures.3G.xml">glPrioritizeTextures</a>, <a href="glTexParameter.3G.xml">glTexParameter</a></span>
</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glGetTexLevelParameter.3G.xml">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"><a accesskey="n" href="glHint.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glGetTexLevelParameter</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">glHint</td></tr></table></div></body></html>
|