2014-03-28 19:06:55 +00:00
|
|
|
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>
|
|
|
|
|
|
|
|
<!-- Converted by db4-upgrade version 1.1 -->
|
|
|
|
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glGenerateMipmap">
|
|
|
|
<info>
|
2013-11-03 11:43:50 +00:00
|
|
|
<copyright>
|
2014-03-28 19:06:55 +00:00
|
|
|
<year>2010-2014</year>
|
2013-11-03 11:43:50 +00:00
|
|
|
<holder>Khronos Group</holder>
|
|
|
|
</copyright>
|
2014-03-28 19:06:55 +00:00
|
|
|
</info>
|
2013-10-10 23:58:54 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>glGenerateMipmap</refentrytitle>
|
|
|
|
<manvolnum>3G</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>glGenerateMipmap</refname>
|
|
|
|
<refpurpose>generate mipmaps for a specified texture target</refpurpose>
|
|
|
|
</refnamediv>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<title>C Specification</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>void <function>glGenerateMipmap</function></funcdef>
|
|
|
|
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="parameters"><title>Parameters</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>target</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specifies the target to which the texture whose mimaps to generate is bound. <parameter>target</parameter> must
|
2014-03-28 19:06:55 +00:00
|
|
|
be <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>,
|
|
|
|
<constant>GL_TEXTURE_2D_ARRAY</constant> or <constant>GL_TEXTURE_CUBE_MAP</constant>.
|
2013-10-10 23:58:54 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="description"><title>Description</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<function>glGenerateMipmap</function> generates mipmaps for the texture attached
|
|
|
|
to <parameter>target</parameter> of the active texture unit. For cube map textures,
|
|
|
|
a <constant>GL_INVALID_OPERATION</constant> error is generated if the texture
|
|
|
|
attached to <parameter>target</parameter> is not cube complete.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Mipmap generation replaces texel array levels
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<!-- eqn: level sub base + 1: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
<mml:mo>+</mml:mo>
|
|
|
|
<mml:mn>1</mml:mn>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
through
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<mml:mrow>
|
|
|
|
<mml:mi mathvariant="italic">q</mml:mi>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
with arrays derived from the
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<!-- eqn: level sub base + 1: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
array, regardless of their previous contents. All other mimap arrays,
|
|
|
|
including the
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<!-- eqn: level sub base + 1: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
array, are left unchanged by this computation.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The internal formats of the derived mipmap arrays all match those of the
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<!-- eqn: level sub base + 1: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
array. The contents of the derived arrays are computed by repeated, filtered
|
|
|
|
reduction of the
|
2014-03-28 19:06:55 +00:00
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
2013-10-10 23:58:54 +00:00
|
|
|
<!-- eqn: level sub base + 1: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
2014-03-28 19:06:55 +00:00
|
|
|
array. For two-dimensional texture arrays, each layer is filtered
|
2013-10-10 23:58:54 +00:00
|
|
|
independently.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="errors"><title>Errors</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
|
|
|
one of the accepted texture targets.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is
|
|
|
|
<constant>GL_TEXTURE_CUBE_MAP</constant> and the texture bound to the <constant>GL_TEXTURE_CUBE_MAP</constant>
|
|
|
|
target of the active texture unit is not cube complete.
|
|
|
|
</para>
|
2014-03-28 19:06:55 +00:00
|
|
|
<para>
|
|
|
|
<constant>GL_INVALID_OPERATION</constant> is generated if the
|
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
|
|
|
<!-- eqn: level sub base: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
array is stored in a compressed internal format.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<constant>GL_INVALID_OPERATION</constant> is generated if the
|
|
|
|
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
|
|
|
|
<!-- eqn: level sub base: -->
|
|
|
|
<mml:mrow>
|
|
|
|
<mml:msub>
|
|
|
|
<mml:mi mathvariant="italic">level</mml:mi>
|
|
|
|
<mml:mi>base</mml:mi>
|
|
|
|
</mml:msub>
|
|
|
|
</mml:mrow>
|
|
|
|
</mml:math></inlineequation>
|
|
|
|
array was not specified with an unsized internal format or a sized internal format that is both
|
|
|
|
color-renderable and texture-filterable.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 xml:id="versions">
|
|
|
|
<title>API Version Support</title>
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="4" align="left">
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry>glGenerateMipmap</entry>
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='es20']/*)"/>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
2013-10-10 23:58:54 +00:00
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="seealso"><title>See Also</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="Copyright"><title>Copyright</title>
|
2013-10-10 23:58:54 +00:00
|
|
|
<para>
|
2014-03-28 19:06:55 +00:00
|
|
|
Copyright <trademark class="copyright"/> 2010-2014 Khronos Group.
|
2013-11-03 11:43:50 +00:00
|
|
|
This material may be distributed subject to the terms and conditions set forth in
|
2013-10-10 23:58:54 +00:00
|
|
|
the Open Publication License, v 1.0, 8 June 1999.
|
2014-03-28 19:06:55 +00:00
|
|
|
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
|
2013-10-10 23:58:54 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|