Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glMinmax"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glMinmax</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glMinmax</refname> | |
17 | <refpurpose>define minmax table</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glMinmax</function></funcdef> | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
24 | <paramdef>GLenum <parameter>internalformat</parameter></paramdef> | |
25 | <paramdef>GLboolean <parameter>sink</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>target</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | The minmax table whose parameters are to be set. | |
36 | Must be | |
37 | <constant>GL_MINMAX</constant>. | |
38 | </para> | |
39 | </listitem> | |
40 | </varlistentry> | |
41 | <varlistentry> | |
42 | <term><parameter>internalformat</parameter></term> | |
43 | <listitem> | |
44 | <para> | |
45 | The format of entries in the minmax table. | |
46 | Must be one of | |
47 | <constant>GL_ALPHA</constant>, | |
48 | <constant>GL_ALPHA4</constant>, | |
49 | <constant>GL_ALPHA8</constant>, | |
50 | <constant>GL_ALPHA12</constant>, | |
51 | <constant>GL_ALPHA16</constant>, | |
52 | <constant>GL_LUMINANCE</constant>, | |
53 | <constant>GL_LUMINANCE4</constant>, | |
54 | <constant>GL_LUMINANCE8</constant>, | |
55 | <constant>GL_LUMINANCE12</constant>, | |
56 | <constant>GL_LUMINANCE16</constant>, | |
57 | <constant>GL_LUMINANCE_ALPHA</constant>, | |
58 | <constant>GL_LUMINANCE4_ALPHA4</constant>, | |
59 | <constant>GL_LUMINANCE6_ALPHA2</constant>, | |
60 | <constant>GL_LUMINANCE8_ALPHA8</constant>, | |
61 | <constant>GL_LUMINANCE12_ALPHA4</constant>, | |
62 | <constant>GL_LUMINANCE12_ALPHA12</constant>, | |
63 | <constant>GL_LUMINANCE16_ALPHA16</constant>, | |
64 | <constant>GL_R3_G3_B2</constant>, | |
65 | <constant>GL_RGB</constant>, | |
66 | <constant>GL_RGB4</constant>, | |
67 | <constant>GL_RGB5</constant>, | |
68 | <constant>GL_RGB8</constant>, | |
69 | <constant>GL_RGB10</constant>, | |
70 | <constant>GL_RGB12</constant>, | |
71 | <constant>GL_RGB16</constant>, | |
72 | <constant>GL_RGBA</constant>, | |
73 | <constant>GL_RGBA2</constant>, | |
74 | <constant>GL_RGBA4</constant>, | |
75 | <constant>GL_RGB5_A1</constant>, | |
76 | <constant>GL_RGBA8</constant>, | |
77 | <constant>GL_RGB10_A2</constant>, | |
78 | <constant>GL_RGBA12</constant>, or | |
79 | <constant>GL_RGBA16</constant>. | |
80 | </para> | |
81 | </listitem> | |
82 | </varlistentry> | |
83 | <varlistentry> | |
84 | <term><parameter>sink</parameter></term> | |
85 | <listitem> | |
86 | <para> | |
87 | If <constant>GL_TRUE</constant>, pixels will be consumed by the minmax | |
88 | process and no drawing or texture loading will take place. | |
89 | If <constant>GL_FALSE</constant>, pixels will proceed to the final conversion process after | |
90 | minmax. | |
91 | </para> | |
92 | </listitem> | |
93 | </varlistentry> | |
94 | </variablelist> | |
95 | </refsect1> | |
96 | <refsect1 id="description"><title>Description</title> | |
97 | <para> | |
98 | When <constant>GL_MINMAX</constant> is enabled, the RGBA components of incoming pixels are | |
99 | compared to the minimum and maximum values for each component, which are | |
100 | stored in the two-element minmax table. | |
101 | (The first element stores the minima, and the second element stores | |
102 | the maxima.) | |
103 | If a pixel component is greater than the corresponding component | |
104 | in the maximum element, then the maximum element is updated with the | |
105 | pixel component value. | |
106 | If a pixel component is less than the corresponding component in | |
107 | the minimum element, then the minimum element is updated with the | |
108 | pixel component value. | |
109 | (In both cases, if the internal format of the minmax table includes | |
110 | luminance, then the R color component of incoming pixels is used | |
111 | for comparison.) | |
112 | The contents of the minmax table may be retrieved at a later time | |
113 | by calling <citerefentry><refentrytitle>glGetMinmax</refentrytitle></citerefentry>. | |
114 | The minmax operation is enabled or disabled by calling <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> or | |
115 | <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>, respectively, with an argument of <constant>GL_MINMAX</constant>. | |
116 | </para> | |
117 | <para> | |
118 | <function>glMinmax</function> redefines the current minmax table to have entries of the format | |
119 | specified by <parameter>internalformat</parameter>. | |
120 | The maximum element is initialized with the smallest possible component | |
121 | values, and the minimum element is initialized with the largest possible | |
122 | component values. | |
123 | The values in the previous minmax table, if any, are lost. | |
124 | If <parameter>sink</parameter> is <constant>GL_TRUE</constant>, then pixels are discarded after minmax; | |
125 | no further processing of the pixels takes place, and no drawing, | |
126 | texture loading, or pixel readback will result. | |
127 | </para> | |
128 | <para> | |
129 | </para> | |
130 | </refsect1> | |
131 | <refsect1 id="notes"><title>Notes</title> | |
132 | <para> | |
133 | <function>glMinmax</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry> | |
134 | is called with an argument of <constant>GL_EXTENSIONS</constant>. | |
135 | </para> | |
136 | </refsect1> | |
137 | <refsect1 id="errors"><title>Errors</title> | |
138 | <para> | |
139 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the allowable | |
140 | values. | |
141 | </para> | |
142 | <para> | |
143 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not one of the | |
144 | allowable values. | |
145 | </para> | |
146 | <para> | |
147 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMinmax</function> is executed | |
148 | between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding | |
149 | execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
150 | </para> | |
151 | </refsect1> | |
152 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
153 | <para> | |
154 | <citerefentry><refentrytitle>glGetMinmaxParameter</refentrytitle></citerefentry> | |
155 | </para> | |
156 | </refsect1> | |
157 | <refsect1 id="seealso"><title>See Also</title> | |
158 | <para> | |
159 | <citerefentry><refentrytitle>glGetMinmax</refentrytitle></citerefentry>, | |
160 | <citerefentry><refentrytitle>glResetMinmax</refentrytitle></citerefentry> | |
161 | </para> | |
162 | </refsect1> | |
163 | <refsect1 id="Copyright"><title>Copyright</title> | |
164 | <para> | |
165 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
166 | Silicon Graphics, Inc. This document is licensed under the SGI | |
167 | Free Software B License. For details, see | |
168 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
169 | </para> | |
170 | </refsect1> | |
171 | </refentry> |