<?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>glGetTexLevelParameter</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="glGetTexImage.3G.xml" title="glGetTexImage"/><link rel="next" href="glGetTexParameter.3G.xml" title="glGetTexParameter"/></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">glGetTexLevelParameter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glGetTexImage.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glGetTexParameter.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glGetTexLevelParameter.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glGetTexLevelParameter.3G-name"/><h2>Name</h2><p>glGetTexLevelParameterfv, glGetTexLevelParameteriv &#8212; return texture parameter values for a specific level of detail</p></div><div class="refsynopsisdiv"><a name="glGetTexLevelParameter.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glGetTexLevelParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLint <i><tt>level</tt></i>, GLenum <i><tt>pname</tt></i>, GLfloat *<i><tt>params</tt></i>);</code></td></tr><tr><td valign="top"><code>void <tt>glGetTexLevelParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLint <i><tt>level</tt></i>, GLenum <i><tt>pname</tt></i>, GLint *<i><tt>params</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glGetTexLevelParameter.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glGetTexLevelParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>level</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594; <tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glGetTexLevelParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>level</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glGetTexLevelParameter.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, either <tt>GL_TEXTURE_1D</tt>,
						<tt>GL_TEXTURE_2D</tt>, <tt>GL_TEXTURE_3D</tt>,
						<tt>GL_PROXY_TEXTURE_1D</tt>, <tt>GL_PROXY_TEXTURE_2D</tt>, or
						<tt>GL_PROXY_TEXTURE_3D</tt>.
					</dd><dt><span class="term"><i><tt>level</tt></i></span></dt><dd>
						Specifies the level-of-detail number of the desired image. Level 0 is the base image level. Level
						<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>n</mml:mi>
							</mml:math> is the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>n</mml:mi>
							</mml:math>th mipmap reduction image.
					</dd><dt><span class="term"><i><tt>pname</tt></i></span></dt><dd>
						Specifies the symbolic name of a texture parameter. <tt>GL_TEXTURE_WIDTH</tt>,
						<tt>GL_TEXTURE_HEIGHT</tt>, <tt>GL_TEXTURE_DEPTH</tt>,
						<tt>GL_TEXTURE_INTERNAL_FORMAT</tt>, <tt>GL_TEXTURE_BORDER</tt>,
						<tt>GL_TEXTURE_RED_SIZE</tt>, <tt>GL_TEXTURE_GREEN_SIZE</tt>,
						<tt>GL_TEXTURE_BLUE_SIZE</tt>, <tt>GL_TEXTURE_ALPHA_SIZE</tt>,
						<tt>GL_TEXTURE_LUMINANCE_SIZE</tt>, and <tt>GL_TEXTURE_INTENSITY_SIZE</tt> are
						accepted.
					</dd><dt><span class="term"><i><tt>params</tt></i></span></dt><dd>
						Returns the requested data.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glGetTexLevelParameter.3G-description"/><h2>Description</h2><p>
			<tt>glGetTexLevelParameter</tt> returns in <i><tt>params</tt></i> texture
			parameter values for a specific level-of-detail value, specified as <i><tt>level</tt></i>.
			<i><tt>target</tt></i> defines the target texture, either <tt>GL_TEXTURE_1D</tt>,
			<tt>GL_TEXTURE_2D</tt>, <tt>GL_TEXTURE_3D</tt>, <tt>GL_PROXY_TEXTURE_1D</tt>,
			<tt>GL_PROXY_TEXTURE_2D</tt>, or <tt>GL_PROXY_TEXTURE_3D</tt>.
		</p><p>
			<tt>GL_MAX_TEXTURE_SIZE</tt>, and <tt>GL_MAX_3D_TEXTURE_SIZE</tt> are not really descriptive
			enough. It has to report the largest square texture image that can be accommodated with mipmaps and borders, but a long
			skinny texture, or a texture without mipmaps and borders, may easily fit in texture memory. The proxy targets allow the
			user to more accurately query whether the GL can accommodate a texture of a given configuration. If the texture cannot
			be accommodated, the texture state variables, which may be queried with <tt>glGetTexLevelParameter</tt>, are set to 0. If the texture can be accommodated, the texture
			state values will be set as they would be set for a non-proxy target.
		</p><p>
			<i><tt>pname</tt></i> specifies the texture parameter whose value or values will be returned.
		</p><p>
			The accepted parameter names are as follows:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_TEXTURE_WIDTH</tt></span></dt><dd>
						<i><tt>params</tt></i> returns a single value, the width of the texture image. This value includes
						the border of the texture image. The initial value is 0.
					</dd><dt><span class="term"><tt>GL_TEXTURE_HEIGHT</tt></span></dt><dd>
						<i><tt>params</tt></i> returns a single value, the height of the texture image. This value includes
						the border of the texture image. The initial value is 0.
					</dd><dt><span class="term"><tt>GL_TEXTURE_DEPTH</tt></span></dt><dd>
						<i><tt>params</tt></i> returns a single value, the depth of the texture image. This value includes
						the border of the texture image. The initial value is 0.
					</dd><dt><span class="term"><tt>GL_TEXTURE_INTERNAL_FORMAT</tt></span></dt><dd>
						<i><tt>params</tt></i> returns a single value, the internal of the texture image.
					</dd><dt><span class="term"><tt>GL_TEXTURE_BORDER</tt></span></dt><dd>
						<i><tt>params</tt></i> returns a single value, the width in pixels of the border of the texture
						image. The initial value is 0.
					</dd><dt><span class="term"><tt>GL_TEXTURE_GREEN_SIZE</tt>,, </span><span class="term"><tt>GL_TEXTURE_BLUE_SIZE</tt>,, </span><span class="term"><tt>GL_TEXTURE_ALPHA_SIZE</tt>,, </span><span class="term"><tt>GL_TEXTURE_LUMINANCE_SIZE</tt>,, </span><span class="term"><tt>GL_TEXTURE_INTENSITY_SIZE</tt>, </span><span class="term"><tt>GL_TEXTURE_RED_SIZE</tt>,</span></dt><dd>
						The internal storage resolution of an individual component. The resolution chosen by the GL will be a close
						match for the resolution requested by the user with the component argument of <a href="glTexImage1D.3G.xml"><tt>glTexImage1D</tt></a>, <a href="glTexImage2D.3G.xml"><tt>glTexImage2D</tt></a>,
						<a href="glTexImage3D.3G.xml"><tt>glTexImage3D</tt></a>, <a href="glCopyTexImage1D.3G.xml"><tt>glCopyTexImage1D</tt></a>, and <a href="glCopyTexImage2D.3G.xml"><tt>glCopyTexImage2D</tt></a>. The initial value is 0.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glGetTexLevelParameter.3G-notes"/><h2>Notes</h2><p>
			If an error is generated, no change is made to the contents of <i><tt>params</tt></i>.
		</p><p>
			<tt>GL_TEXTURE_INTERNAL_FORMAT</tt> is available only if the GL version is 1.1 or greater. In version 1.0,
			use <tt>GL_TEXTURE_COMPONENTS</tt> instead.
		</p><p>
			<tt>GL_PROXY_TEXTURE_1D</tt> and <tt>GL_PROXY_TEXTURE_2D</tt> are available only if the GL
			version is 1.1 or greater.
		</p><p>
			<tt>GL_TEXTURE_3D</tt>, <tt>GL_PROXY_TEXTURE_3D</tt>, and <tt>GL_TEXTURE_DEPTH</tt>
			are available only if the GL version is 1.2 or greater.
		</p><p>
			When the <tt>GL_ARB_multitexture</tt> extension is supported, <tt>glGetTexLevelParameter</tt> returns the texture level parameters for the active texture unit.
		</p></div><div class="refsect1" lang="en"><a name="glGetTexLevelParameter.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_VALUE</tt> is generated if <i><tt>level</tt></i> is less than 0.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> may be generated if <i><tt>level</tt></i> is greater than <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
					<mml:msub>
						<mml:mi>log</mml:mi>
						<mml:mn>2</mml:mn>
					</mml:msub>
				</mml:math> <i><tt>max</tt></i>, where <i><tt>max</tt></i> is the returned value of
			<tt>GL_MAX_TEXTURE_SIZE</tt>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glGetTexLevelParameter</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="glGetTexLevelParameter.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glActiveTextureARB.3G.xml">glActiveTextureARB</a>, <a href="glGetTexParameter.3G.xml">glGetTexParameter</a>, <a href="glCopyTexImage1D.3G.xml">glCopyTexImage1D</a>, <a href="glCopyTexImage2D.3G.xml">glCopyTexImage2D</a>, <a href="glCopyTexSubImage1D.3G.xml">glCopyTexSubImage1D</a>, <a href="glCopyTexSubImage2D.3G.xml">glCopyTexSubImage2D</a>, <a href="glCopyTexSubImage3D.3G.xml">glCopyTexSubImage3D</a>, <a href="glTexEnv.3G.xml">glTexEnv</a>, <a href="glTexGen.3G.xml">glTexGen</a>, <a href="glTexImage1D.3G.xml">glTexImage1D</a>, <a href="glTexImage2D.3G.xml">glTexImage2D</a>, <a href="glTexImage3D.3G.xml">glTexImage3D</a>, <a href="glTexSubImage1D.3G.xml">glTexSubImage1D</a>, <a href="glTexSubImage2D.3G.xml">glTexSubImage2D</a>, <a href="glTexSubImage3D.3G.xml">glTexSubImage3D</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="glGetTexImage.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="glGetTexParameter.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glGetTexImage </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glGetTexParameter</td></tr></table></div></body></html>