Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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>glGetMinmax</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGetMinmax"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetMinmax — get minimum and maximum pixel values</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">glGetMinmax</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLboolean </td><td><var class="pdparam">reset</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">types</var>, </td></tr><tr><td> </td><td>GLvoid * </td><td><var class="pdparam">values</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 | Must be | |
5 | <code class="constant">GL_MINMAX</code>. | |
6 | </p></dd><dt><span class="term"><em class="parameter"><code>reset</code></em></span></dt><dd><p> | |
7 | If <code class="constant">GL_TRUE</code>, all entries in the minmax table that are actually | |
8 | returned are reset to their initial values. (Other entries are unaltered.) | |
9 | If <code class="constant">GL_FALSE</code>, the minmax table is unaltered. | |
10 | </p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p> | |
11 | The format of the data to be returned in <em class="parameter"><code>values</code></em>. | |
12 | Must be one of | |
13 | <code class="constant">GL_RED</code>, | |
14 | <code class="constant">GL_GREEN</code>, | |
15 | <code class="constant">GL_BLUE</code>, | |
16 | <code class="constant">GL_ALPHA</code>, | |
17 | <code class="constant">GL_RGB</code>, | |
18 | <code class="constant">GL_BGR</code>, | |
19 | <code class="constant">GL_RGBA</code>, | |
20 | <code class="constant">GL_BGRA</code>, | |
21 | <code class="constant">GL_LUMINANCE</code>, or | |
22 | <code class="constant">GL_LUMINANCE_ALPHA</code>. | |
23 | </p></dd><dt><span class="term"><em class="parameter"><code>types</code></em></span></dt><dd><p> | |
24 | The type of the data to be returned in <em class="parameter"><code>values</code></em>. | |
25 | Symbolic constants | |
26 | <code class="constant">GL_UNSIGNED_BYTE</code>, | |
27 | <code class="constant">GL_BYTE</code>, | |
28 | <code class="constant">GL_BITMAP</code>, | |
29 | <code class="constant">GL_UNSIGNED_SHORT</code>, | |
30 | <code class="constant">GL_SHORT</code>, | |
31 | <code class="constant">GL_UNSIGNED_INT</code>, | |
32 | <code class="constant">GL_INT</code>, | |
33 | <code class="constant">GL_FLOAT</code>, | |
34 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>, | |
35 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>, | |
36 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, | |
37 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>, | |
38 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>, | |
39 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>, | |
40 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>, | |
41 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>, | |
42 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>, | |
43 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>, | |
44 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and | |
45 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> | |
46 | are accepted. | |
47 | </p></dd><dt><span class="term"><em class="parameter"><code>values</code></em></span></dt><dd><p> | |
48 | A pointer to storage for the returned values. | |
49 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
50 | <code class="function">glGetMinmax</code> returns the accumulated minimum and maximum pixel values (computed on a | |
51 | per-component basis) in a one-dimensional image of width 2. The first set | |
52 | of return values are the minima, and the second set of return values | |
53 | are the maxima. | |
54 | The format of the return values is determined by <em class="parameter"><code>format</code></em>, and their type is | |
55 | determined by <em class="parameter"><code>types</code></em>. | |
56 | </p><p> | |
57 | If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_PACK_BUFFER</code> target | |
58 | (see <a class="citerefentry" href="glBindBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while minimum and maximum pixel values are | |
59 | requested, <em class="parameter"><code>values</code></em> is treated as a byte offset into the buffer object's data store. | |
60 | </p><p> | |
61 | No pixel transfer operations are performed on the return values, but pixel | |
62 | storage modes that are applicable to one-dimensional images are performed. | |
63 | Color components that are requested in the specified <em class="parameter"><code>format</code></em>, but that | |
64 | are not included in the internal format of the minmax table, are | |
65 | returned as zero. The assignment of internal color components to the | |
66 | components requested by <em class="parameter"><code>format</code></em> are as follows: | |
67 | </p><p> | |
68 | </p><div class="informaltable"><table border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left"><span class="bold"><strong> | |
69 | Internal Component | |
70 | </strong></span></th><th align="left"><span class="bold"><strong> | |
71 | Resulting Component | |
72 | </strong></span></th></tr></thead><tbody><tr><td align="left"> | |
73 | Red | |
74 | </td><td align="left"> | |
75 | Red | |
76 | </td></tr><tr><td align="left"> | |
77 | Green | |
78 | </td><td align="left"> | |
79 | Green | |
80 | </td></tr><tr><td align="left"> | |
81 | Blue | |
82 | </td><td align="left"> | |
83 | Blue | |
84 | </td></tr><tr><td align="left"> | |
85 | Alpha | |
86 | </td><td align="left"> | |
87 | Alpha | |
88 | </td></tr><tr><td align="left"> | |
89 | Luminance | |
90 | </td><td align="left"> | |
91 | Red | |
92 | </td></tr></tbody></table></div><p> | |
93 | If <em class="parameter"><code>reset</code></em> is <code class="constant">GL_TRUE</code>, the minmax table entries corresponding | |
94 | to the return values are reset to their initial | |
95 | values. Minimum and maximum values that are not returned are not | |
96 | modified, even if <em class="parameter"><code>reset</code></em> is <code class="constant">GL_TRUE</code>. | |
97 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
98 | <code class="function">glGetMinmax</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> | |
99 | is called with an argument of <code class="constant">GL_EXTENSIONS</code>. | |
100 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
101 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not <code class="constant">GL_MINMAX</code>. | |
102 | </p><p> | |
103 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not one of the allowable | |
104 | values. | |
105 | </p><p> | |
106 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>types</code></em> is not one of the allowable | |
107 | values. | |
108 | </p><p> | |
109 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>types</code></em> is one of | |
110 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>, | |
111 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>, | |
112 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or | |
113 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code> | |
114 | and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>. | |
115 | </p><p> | |
116 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>types</code></em> is one of | |
117 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>, | |
118 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>, | |
119 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>, | |
120 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>, | |
121 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>, | |
122 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>, | |
123 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or | |
124 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> | |
125 | and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>. | |
126 | </p><p> | |
127 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
128 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the buffer object's data store is currently mapped. | |
129 | </p><p> | |
130 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
131 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the data would be packed to the buffer | |
132 | object such that the memory writes required would exceed the data store size. | |
133 | </p><p> | |
134 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
135 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and <em class="parameter"><code>values</code></em> is not evenly divisible | |
136 | into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>. | |
137 | </p><p> | |
138 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glGetMinmax</code> is executed | |
139 | between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding | |
140 | execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. | |
141 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
142 | <a class="citerefentry" href="glGetMinmaxParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetMinmaxParameter</span></span></a> | |
143 | </p><p> | |
144 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_PACK_BUFFER_BINDING</code> | |
145 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
146 | <a class="citerefentry" href="glMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glMinmax</span></span></a>, | |
147 | <a class="citerefentry" href="glResetMinmax.xml"><span class="citerefentry"><span class="refentrytitle">glResetMinmax</span></span></a>, | |
148 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
149 | Copyright <span class="trademark"></span>© 1991-2006 | |
150 | Silicon Graphics, Inc. This document is licensed under the SGI | |
151 | Free Software B License. For details, see | |
152 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
153 | </p></div></div></body></html> |