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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glGenerateMipmap">
<info>
<copyright>
<year>2010-2014</year>
<holder>Khronos Group</holder>
</copyright>
</info>
<refmeta>
<refentrytitle>glGenerateMipmap</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glGenerateMipmap</refname>
<refname>glGenerateTextureMipmap</refname>
<refpurpose>generate mipmaps for a specified texture object</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGenerateMipmap</function></funcdef>
<paramdef>GLenum <parameter>target</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>glGenerateTextureMipmap</function></funcdef>
<paramdef>GLuint <parameter>texture</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 xml:id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>target</parameter></term>
<listitem>
<para>
Specifies the target to which the texture object is
bound for <function>glGenerateMipmap</function>. Must be
one of <constant>GL_TEXTURE_1D</constant>,
<constant>GL_TEXTURE_2D</constant>,
<constant>GL_TEXTURE_3D</constant>,
<constant>GL_TEXTURE_1D_ARRAY</constant>,
<constant>GL_TEXTURE_2D_ARRAY</constant>,
<constant>GL_TEXTURE_CUBE_MAP</constant>, or
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>texture</parameter></term>
<listitem>
<para>
Specifies the texture object name for
<function>glGenerateTextureMipmap</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 xml:id="description"><title>Description</title>
<para>
<function>glGenerateMipmap</function> and
<function>glGenerateTextureMipmap</function> generates mipmaps
for the specified texture object. For
<function>glGenerateMipmap</function>, the texture object is
that bound to to <parameter>target</parameter>. For
<function>glGenerateTextureMipmap</function>,
<parameter>texture</parameter> is the name of the texture
object.
</para>
<para>
For cube map and cube map array textures, the texture object
must be cube complete or cube array complete respectively.
</para>
<para>
Mipmap generation replaces texel image levels $level_{base} + 1$
through $q$ with images derived from the $level_{base}$ image,
regardless of their previous contents. All other mimap images,
including the $level_{base}+1$ image, are left unchanged by this
computation.
</para>
<para>
The internal formats of the derived mipmap images all match
those of the $level_{base}$ image. The contents of the derived
images are computed by repeated, filtered reduction of the
$level_{base} + 1$ image. For one- and two-dimensional array and
cube map array textures, each layer is filtered independently.
</para>
</refsect1>
<refsect1 xml:id="notes"><title>Notes</title>
<para>
Cube map array textures are accepted only if the GL version is
4.0 or higher.
</para>
</refsect1>
<refsect1 xml:id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated by
<function>glGenerateMipmap</function> if
<parameter>target</parameter> is not one of the accepted texture
targets.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated by
<function>glGenerateTextureMipmap</function> if
<parameter>texture</parameter> is not the name of an existing
texture object.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if
<parameter>target</parameter> is
<constant>GL_TEXTURE_CUBE_MAP</constant> or
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>, and the
specified texture object is not cube complete or cube array
complete, respectively.
</para>
</refsect1>
<refsect1 xml:id="versions"><title>Version Support</title>
<informaltable>
<tgroup cols="13" align="left">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
<tbody>
<row>
<entry><function>glGenerateMipmap</function></entry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='30']/*)"/>
</row>
<row>
<entry><function>glGenerateTextureMipmap</function></entry>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='45']/*)"/>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 xml:id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 xml:id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"/> 2010-2014 Khronos Group.
This material may be distributed subject to the terms and conditions set forth in
the Open Publication License, v 1.0, 8 June 1999.
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
</para>
</refsect1>
</refentry>
|