<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
<!-- saved from url=(0013)about:internet -->
<?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" /><title>glMinmax</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glMinmax"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glMinmax — define minmax table</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glMinmax</b>(</code></td><td>GLenum  </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">internalformat</var>, </td></tr><tr><td> </td><td>GLboolean  </td><td><var class="pdparam">sink</var><code>)</code>;</td></tr></table></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>
                    The minmax table whose parameters are to be set.
                    Must be
                    <code class="constant">GL_MINMAX</code>.
                </p></dd><dt><span class="term"><em class="parameter"><code>internalformat</code></em></span></dt><dd><p>
                    The format of entries in the minmax table.
                    Must be one of
                    <code class="constant">GL_ALPHA</code>,
                    <code class="constant">GL_ALPHA4</code>,
                    <code class="constant">GL_ALPHA8</code>,
                    <code class="constant">GL_ALPHA12</code>,
                    <code class="constant">GL_ALPHA16</code>,
                    <code class="constant">GL_LUMINANCE</code>,
                    <code class="constant">GL_LUMINANCE4</code>,
                    <code class="constant">GL_LUMINANCE8</code>,
                    <code class="constant">GL_LUMINANCE12</code>,
                    <code class="constant">GL_LUMINANCE16</code>,
                    <code class="constant">GL_LUMINANCE_ALPHA</code>,
                    <code class="constant">GL_LUMINANCE4_ALPHA4</code>,
                    <code class="constant">GL_LUMINANCE6_ALPHA2</code>,
                    <code class="constant">GL_LUMINANCE8_ALPHA8</code>,
                    <code class="constant">GL_LUMINANCE12_ALPHA4</code>,
                    <code class="constant">GL_LUMINANCE12_ALPHA12</code>,
                    <code class="constant">GL_LUMINANCE16_ALPHA16</code>,
                    <code class="constant">GL_R3_G3_B2</code>,
                    <code class="constant">GL_RGB</code>,
                    <code class="constant">GL_RGB4</code>,
                    <code class="constant">GL_RGB5</code>,
                    <code class="constant">GL_RGB8</code>,
                    <code class="constant">GL_RGB10</code>,
                    <code class="constant">GL_RGB12</code>,
                    <code class="constant">GL_RGB16</code>,
                    <code class="constant">GL_RGBA</code>,
                    <code class="constant">GL_RGBA2</code>,
                    <code class="constant">GL_RGBA4</code>,
                    <code class="constant">GL_RGB5_A1</code>,
                    <code class="constant">GL_RGBA8</code>,
                    <code class="constant">GL_RGB10_A2</code>,
                    <code class="constant">GL_RGBA12</code>, or
                    <code class="constant">GL_RGBA16</code>.
                </p></dd><dt><span class="term"><em class="parameter"><code>sink</code></em></span></dt><dd><p>
                    If <code class="constant">GL_TRUE</code>, pixels will be consumed by the minmax
                    process and no drawing or texture loading will take place.
                    If <code class="constant">GL_FALSE</code>, pixels will proceed to the final conversion process after
                    minmax.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            When <code class="constant">GL_MINMAX</code> is enabled, the RGBA components of incoming pixels are
            compared to the minimum and maximum values for each component, which are
            stored in the two-element minmax table.
            (The first element stores the minima, and the second element stores
            the maxima.)
            If a pixel component is greater than the corresponding component
            in the maximum element, then the maximum element is updated with the
            pixel component value.
            If a pixel component is less than the corresponding component in
            the minimum element, then the minimum element is updated with the
            pixel component value.
            (In both cases, if the internal format of the minmax table includes
            luminance, then the R color component of incoming pixels is used
            for comparison.)
            The contents of the minmax table may be retrieved at a later time
            by calling <a class="citerefentry" href="glGetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmax</span></span></a>.
            The minmax operation is enabled or disabled by calling <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> or
            <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>, respectively, with an argument of <code class="constant">GL_MINMAX</code>.
        </p><p>
            <code class="function">glMinmax</code> redefines the current minmax table to have entries of the format
            specified by <em class="parameter"><code>internalformat</code></em>.
            The maximum element is initialized with the smallest possible component
            values, and the minimum element is initialized with the largest possible
            component values.
            The values in the previous minmax table, if any, are lost.
            If <em class="parameter"><code>sink</code></em> is <code class="constant">GL_TRUE</code>, then pixels are discarded after minmax;
            no further processing of the pixels takes place, and no drawing,
            texture loading, or pixel readback will result.
        </p><p>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            <code class="function">glMinmax</code> is present only if <code class="code">ARB_imaging</code> is returned when <a class="citerefentry" href="glGetString.xml"><span class="citerefentry"><span class="refentrytitle">glGetString</span></span></a>
            is called with an argument of <code class="constant">GL_EXTENSIONS</code>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not one of the allowable
            values.
        </p><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>internalformat</code></em> is not one of the
            allowable values.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMinmax</code> is executed
            between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding
            execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
            <a class="citerefentry" href="glGetMinmaxParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmaxParameter</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glGetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmax</span></span></a>,
            <a class="citerefentry" href="glResetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glResetMinmax</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>
