rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / xhtml / glGenerateMipmap.xml
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 - OpenGL 4 Reference Pages</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.
14 </p><p>
15 Mipmap generation replaces texel array levels
16 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
17
18 <mml:mrow>
19 <mml:msub>
20 <mml:mi mathvariant="italic">level</mml:mi>
21 <mml:mi>base</mml:mi>
22 </mml:msub>
23 <mml:mo>+</mml:mo>
24 <mml:mn>1</mml:mn>
25 </mml:mrow>
26 </mml:math>
27 through
28 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
29 <mml:mrow>
30 <mml:mi mathvariant="italic">q</mml:mi>
31 </mml:mrow>
32 </mml:math>
33 with arrays derived from the
34 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
35
36 <mml:mrow>
37 <mml:msub>
38 <mml:mi mathvariant="italic">level</mml:mi>
39 <mml:mi>base</mml:mi>
40 </mml:msub>
41 </mml:mrow>
42 </mml:math>
43 array, regardless of their previous contents. All other mimap arrays,
44 including the
45 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
46
47 <mml:mrow>
48 <mml:msub>
49 <mml:mi mathvariant="italic">level</mml:mi>
50 <mml:mi>base</mml:mi>
51 </mml:msub>
52 </mml:mrow>
53 </mml:math>
54 array, are left unchanged by this computation.
55 </p><p>
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">
58
59 <mml:mrow>
60 <mml:msub>
61 <mml:mi mathvariant="italic">level</mml:mi>
62 <mml:mi>base</mml:mi>
63 </mml:msub>
64 </mml:mrow>
65 </mml:math>
66 array. The contents of the derived arrays are computed by repeated, filtered
67 reduction of the
68 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
69
70 <mml:mrow>
71 <mml:msub>
72 <mml:mi mathvariant="italic">level</mml:mi>
73 <mml:mi>base</mml:mi>
74 </mml:msub>
75 </mml:mrow>
76 </mml:math>
77 array. For one- and two-dimensional texture arrays, each layer is filtered
78 independently.
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.
82 </p><p>
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>