rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glGenerateMipmap.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
4<refentry id="glGenerateMipmap">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2010</year>\r
9 <holder>Khronos Group</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>glGenerateMipmap</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glGenerateMipmap</refname>\r
17 <refpurpose>generate mipmaps for a specified texture target</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glGenerateMipmap</function></funcdef>\r
23 <paramdef>GLenum <parameter>target</parameter></paramdef>\r
24 </funcprototype>\r
25 </funcsynopsis>\r
26 </refsynopsisdiv>\r
27 <!-- eqn: ignoring delim $$ -->\r
28 <refsect1 id="parameters"><title>Parameters</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term><parameter>target</parameter></term>\r
32 <listitem>\r
33 <para>\r
34 Specifies the target to which the texture whose mimaps to generate is bound. <parameter>target</parameter> must\r
35 be <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>,\r
36 <constant>GL_TEXTURE_1D_ARRAY</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant> or\r
37 <constant>GL_TEXTURE_CUBE_MAP</constant>.\r
38 </para>\r
39 </listitem>\r
40 </varlistentry>\r
41 </variablelist>\r
42 </refsect1>\r
43 <refsect1 id="description"><title>Description</title>\r
44 <para>\r
45 <function>glGenerateMipmap</function> generates mipmaps for the texture attached\r
46 to <parameter>target</parameter> of the active texture unit. For cube map textures,\r
47 a <constant>GL_INVALID_OPERATION</constant> error is generated if the texture\r
48 attached to <parameter>target</parameter> is not cube complete.\r
49 </para>\r
50 <para>\r
51 Mipmap generation replaces texel array levels\r
52 <inlineequation><mml:math>\r
53 <!-- eqn: level sub base + 1: -->\r
54 <mml:mrow>\r
55 <mml:msub>\r
56 <mml:mi mathvariant="italic">level</mml:mi>\r
57 <mml:mi>base</mml:mi>\r
58 </mml:msub>\r
59 <mml:mo>+</mml:mo>\r
60 <mml:mn>1</mml:mn>\r
61 </mml:mrow>\r
62 </mml:math></inlineequation>\r
63 through\r
64 <inlineequation><mml:math>\r
65 <mml:mrow>\r
66 <mml:mi mathvariant="italic">q</mml:mi>\r
67 </mml:mrow>\r
68 </mml:math></inlineequation>\r
69 with arrays derived from the\r
70 <inlineequation><mml:math>\r
71 <!-- eqn: level sub base + 1: -->\r
72 <mml:mrow>\r
73 <mml:msub>\r
74 <mml:mi mathvariant="italic">level</mml:mi>\r
75 <mml:mi>base</mml:mi>\r
76 </mml:msub>\r
77 </mml:mrow>\r
78 </mml:math></inlineequation>\r
79 array, regardless of their previous contents. All other mimap arrays,\r
80 including the\r
81 <inlineequation><mml:math>\r
82 <!-- eqn: level sub base + 1: -->\r
83 <mml:mrow>\r
84 <mml:msub>\r
85 <mml:mi mathvariant="italic">level</mml:mi>\r
86 <mml:mi>base</mml:mi>\r
87 </mml:msub>\r
88 </mml:mrow>\r
89 </mml:math></inlineequation>\r
90 array, are left unchanged by this computation.\r
91 </para>\r
92 <para>\r
93 The internal formats of the derived mipmap arrays all match those of the\r
94 <inlineequation><mml:math>\r
95 <!-- eqn: level sub base + 1: -->\r
96 <mml:mrow>\r
97 <mml:msub>\r
98 <mml:mi mathvariant="italic">level</mml:mi>\r
99 <mml:mi>base</mml:mi>\r
100 </mml:msub>\r
101 </mml:mrow>\r
102 </mml:math></inlineequation>\r
103 array. The contents of the derived arrays are computed by repeated, filtered\r
104 reduction of the\r
105 <inlineequation><mml:math>\r
106 <!-- eqn: level sub base + 1: -->\r
107 <mml:mrow>\r
108 <mml:msub>\r
109 <mml:mi mathvariant="italic">level</mml:mi>\r
110 <mml:mi>base</mml:mi>\r
111 </mml:msub>\r
112 </mml:mrow>\r
113 </mml:math></inlineequation>\r
114 array. For one- and two-dimensional texture arrays, each layer is filtered\r
115 independently.\r
116 </para>\r
117 </refsect1>\r
118 <refsect1 id="errors"><title>Errors</title>\r
119 <para>\r
120 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not\r
121 one of the accepted texture targets.\r
122 </para>\r
123 <para>\r
124 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is\r
125 <constant>GL_TEXTURE_CUBE_MAP</constant> and the texture bound to the <constant>GL_TEXTURE_CUBE_MAP</constant>\r
126 target of the active texture unit is not cube complete.\r
127 </para>\r
128 </refsect1>\r
129 <refsect1 id="seealso"><title>See Also</title>\r
130 <para>\r
131 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,\r
132 <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,\r
133 <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>\r
134 </para>\r
135 </refsect1>\r
136 <refsect1 id="Copyright"><title>Copyright</title>\r
137 <para>\r
138 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
139 This material may be distributed subject to the terms and conditions set forth in \r
140 the Open Publication License, v 1.0, 8 June 1999.\r
141 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
142 </para>\r
143 </refsect1>\r
144</refentry>\r