1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glGenerateMipmap</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGenerateMipmap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGenerateMipmap — generate mipmaps for a specified texture target</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">glGenerateMipmap</b>(</code>GLenum <var class="pdparam">target</var><code>)</code>;</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
5 Specifies the target to which the texture whose mimaps to generate is bound. <em class="parameter"><code>target</code></em> must
6 be <code class="constant">GL_TEXTURE_1D</code>, <code class="constant">GL_TEXTURE_2D</code>, <code class="constant">GL_TEXTURE_3D</code>,
7 <code class="constant">GL_TEXTURE_1D_ARRAY</code>, <code class="constant">GL_TEXTURE_2D_ARRAY</code> or
8 <code class="constant">GL_TEXTURE_CUBE_MAP</code>.
9 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
10 <code class="function">glGenerateMipmap</code> generates mipmaps for the texture attached
11 to <em class="parameter"><code>target</code></em> of the active texture unit. For cube map textures,
12 a <code class="constant">GL_INVALID_OPERATION</code> error is generated if the texture
13 attached to <em class="parameter"><code>target</code></em> is not cube complete.
15 Mipmap generation replaces texel array levels
16 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
20 <mml:mi mathvariant="italic">level</mml:mi>
28 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
30 <mml:mi mathvariant="italic">q</mml:mi>
33 with arrays derived from the
34 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
38 <mml:mi mathvariant="italic">level</mml:mi>
43 array, regardless of their previous contents. All other mimap arrays,
45 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
49 <mml:mi mathvariant="italic">level</mml:mi>
54 array, are left unchanged by this computation.
56 The internal formats of the derived mipmap arrays all match those of the
57 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
61 <mml:mi mathvariant="italic">level</mml:mi>
66 array. The contents of the derived arrays are computed by repeated, filtered
68 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
72 <mml:mi mathvariant="italic">level</mml:mi>
77 array. For one- and two-dimensional texture arrays, each layer is filtered
79 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
80 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not
81 one of the accepted texture targets.
83 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>target</code></em> is
84 <code class="constant">GL_TEXTURE_CUBE_MAP</code> and the texture bound to the <code class="constant">GL_TEXTURE_CUBE_MAP</code>
85 target of the active texture unit is not cube complete.
86 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
87 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
88 <a href="glBindTexture.xml"><span class="citerefentry"><span class="refentrytitle">glBindTexture</span></span></a>,
89 <a href="glGenTextures.xml"><span class="citerefentry"><span class="refentrytitle">glGenTextures</span></span></a>
90 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
91 Copyright <span class="trademark"></span>© 2010 Khronos Group.
92 This material may be distributed subject to the terms and conditions set forth in
93 the Open Publication License, v 1.0, 8 June 1999.
94 <a href="http://opencontent.org/openpub/" target="_top">http://opencontent.org/openpub/</a>.
95 </p></div></div></body></html>