| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
| 2 | <!-- saved from url=(0013)about:internet --> |
| 3 | <?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> |
| 4 | The minmax table whose parameters are to be set. |
| 5 | Must be |
| 6 | <code class="constant">GL_MINMAX</code>. |
| 7 | </p></dd><dt><span class="term"><em class="parameter"><code>internalformat</code></em></span></dt><dd><p> |
| 8 | The format of entries in the minmax table. |
| 9 | Must be one of |
| 10 | <code class="constant">GL_ALPHA</code>, |
| 11 | <code class="constant">GL_ALPHA4</code>, |
| 12 | <code class="constant">GL_ALPHA8</code>, |
| 13 | <code class="constant">GL_ALPHA12</code>, |
| 14 | <code class="constant">GL_ALPHA16</code>, |
| 15 | <code class="constant">GL_LUMINANCE</code>, |
| 16 | <code class="constant">GL_LUMINANCE4</code>, |
| 17 | <code class="constant">GL_LUMINANCE8</code>, |
| 18 | <code class="constant">GL_LUMINANCE12</code>, |
| 19 | <code class="constant">GL_LUMINANCE16</code>, |
| 20 | <code class="constant">GL_LUMINANCE_ALPHA</code>, |
| 21 | <code class="constant">GL_LUMINANCE4_ALPHA4</code>, |
| 22 | <code class="constant">GL_LUMINANCE6_ALPHA2</code>, |
| 23 | <code class="constant">GL_LUMINANCE8_ALPHA8</code>, |
| 24 | <code class="constant">GL_LUMINANCE12_ALPHA4</code>, |
| 25 | <code class="constant">GL_LUMINANCE12_ALPHA12</code>, |
| 26 | <code class="constant">GL_LUMINANCE16_ALPHA16</code>, |
| 27 | <code class="constant">GL_R3_G3_B2</code>, |
| 28 | <code class="constant">GL_RGB</code>, |
| 29 | <code class="constant">GL_RGB4</code>, |
| 30 | <code class="constant">GL_RGB5</code>, |
| 31 | <code class="constant">GL_RGB8</code>, |
| 32 | <code class="constant">GL_RGB10</code>, |
| 33 | <code class="constant">GL_RGB12</code>, |
| 34 | <code class="constant">GL_RGB16</code>, |
| 35 | <code class="constant">GL_RGBA</code>, |
| 36 | <code class="constant">GL_RGBA2</code>, |
| 37 | <code class="constant">GL_RGBA4</code>, |
| 38 | <code class="constant">GL_RGB5_A1</code>, |
| 39 | <code class="constant">GL_RGBA8</code>, |
| 40 | <code class="constant">GL_RGB10_A2</code>, |
| 41 | <code class="constant">GL_RGBA12</code>, or |
| 42 | <code class="constant">GL_RGBA16</code>. |
| 43 | </p></dd><dt><span class="term"><em class="parameter"><code>sink</code></em></span></dt><dd><p> |
| 44 | If <code class="constant">GL_TRUE</code>, pixels will be consumed by the minmax |
| 45 | process and no drawing or texture loading will take place. |
| 46 | If <code class="constant">GL_FALSE</code>, pixels will proceed to the final conversion process after |
| 47 | minmax. |
| 48 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> |
| 49 | When <code class="constant">GL_MINMAX</code> is enabled, the RGBA components of incoming pixels are |
| 50 | compared to the minimum and maximum values for each component, which are |
| 51 | stored in the two-element minmax table. |
| 52 | (The first element stores the minima, and the second element stores |
| 53 | the maxima.) |
| 54 | If a pixel component is greater than the corresponding component |
| 55 | in the maximum element, then the maximum element is updated with the |
| 56 | pixel component value. |
| 57 | If a pixel component is less than the corresponding component in |
| 58 | the minimum element, then the minimum element is updated with the |
| 59 | pixel component value. |
| 60 | (In both cases, if the internal format of the minmax table includes |
| 61 | luminance, then the R color component of incoming pixels is used |
| 62 | for comparison.) |
| 63 | The contents of the minmax table may be retrieved at a later time |
| 64 | by calling <a class="citerefentry" href="glGetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmax</span></span></a>. |
| 65 | 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 |
| 66 | <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>. |
| 67 | </p><p> |
| 68 | <code class="function">glMinmax</code> redefines the current minmax table to have entries of the format |
| 69 | specified by <em class="parameter"><code>internalformat</code></em>. |
| 70 | The maximum element is initialized with the smallest possible component |
| 71 | values, and the minimum element is initialized with the largest possible |
| 72 | component values. |
| 73 | The values in the previous minmax table, if any, are lost. |
| 74 | If <em class="parameter"><code>sink</code></em> is <code class="constant">GL_TRUE</code>, then pixels are discarded after minmax; |
| 75 | no further processing of the pixels takes place, and no drawing, |
| 76 | texture loading, or pixel readback will result. |
| 77 | </p><p> |
| 78 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> |
| 79 | <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> |
| 80 | is called with an argument of <code class="constant">GL_EXTENSIONS</code>. |
| 81 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> |
| 82 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not one of the allowable |
| 83 | values. |
| 84 | </p><p> |
| 85 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>internalformat</code></em> is not one of the |
| 86 | allowable values. |
| 87 | </p><p> |
| 88 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glMinmax</code> is executed |
| 89 | between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding |
| 90 | execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. |
| 91 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> |
| 92 | <a class="citerefentry" href="glGetMinmaxParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmaxParameter</span></span></a> |
| 93 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> |
| 94 | <a class="citerefentry" href="glGetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmax</span></span></a>, |
| 95 | <a class="citerefentry" href="glResetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glResetMinmax</span></span></a> |
| 96 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> |
| 97 | Copyright <span class="trademark"></span>© 1991-2006 |
| 98 | Silicon Graphics, Inc. This document is licensed under the SGI |
| 99 | Free Software B License. For details, see |
| 100 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. |
| 101 | </p></div></div></body></html> |