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=
"glGetMinmax">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glGetMinmax
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetMinmax
</refname>
17 <refpurpose>get minimum and maximum pixel values
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glGetMinmax
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLboolean
<parameter>reset
</parameter></paramdef>
25 <paramdef>GLenum
<parameter>format
</parameter></paramdef>
26 <paramdef>GLenum
<parameter>types
</parameter></paramdef>
27 <paramdef>GLvoid *
<parameter>values
</parameter></paramdef>
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>target
</parameter></term>
38 <constant>GL_MINMAX
</constant>.
43 <term><parameter>reset
</parameter></term>
46 If
<constant>GL_TRUE
</constant>, all entries in the minmax table that are actually
47 returned are reset to their initial values. (Other entries are unaltered.)
48 If
<constant>GL_FALSE
</constant>, the minmax table is unaltered.
53 <term><parameter>format
</parameter></term>
56 The format of the data to be returned in
<parameter>values
</parameter>.
58 <constant>GL_RED
</constant>,
59 <constant>GL_GREEN
</constant>,
60 <constant>GL_BLUE
</constant>,
61 <constant>GL_ALPHA
</constant>,
62 <constant>GL_RGB
</constant>,
63 <constant>GL_BGR
</constant>,
64 <constant>GL_RGBA
</constant>,
65 <constant>GL_BGRA
</constant>,
66 <constant>GL_LUMINANCE
</constant>, or
67 <constant>GL_LUMINANCE_ALPHA
</constant>.
72 <term><parameter>types
</parameter></term>
75 The type of the data to be returned in
<parameter>values
</parameter>.
77 <constant>GL_UNSIGNED_BYTE
</constant>,
78 <constant>GL_BYTE
</constant>,
79 <constant>GL_BITMAP
</constant>,
80 <constant>GL_UNSIGNED_SHORT
</constant>,
81 <constant>GL_SHORT
</constant>,
82 <constant>GL_UNSIGNED_INT
</constant>,
83 <constant>GL_INT
</constant>,
84 <constant>GL_FLOAT
</constant>,
85 <constant>GL_UNSIGNED_BYTE_3_3_2
</constant>,
86 <constant>GL_UNSIGNED_BYTE_2_3_3_REV
</constant>,
87 <constant>GL_UNSIGNED_SHORT_5_6_5
</constant>,
88 <constant>GL_UNSIGNED_SHORT_5_6_5_REV
</constant>,
89 <constant>GL_UNSIGNED_SHORT_4_4_4_4
</constant>,
90 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV
</constant>,
91 <constant>GL_UNSIGNED_SHORT_5_5_5_1
</constant>,
92 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV
</constant>,
93 <constant>GL_UNSIGNED_INT_8_8_8_8
</constant>,
94 <constant>GL_UNSIGNED_INT_8_8_8_8_REV
</constant>,
95 <constant>GL_UNSIGNED_INT_10_10_10_2
</constant>, and
96 <constant>GL_UNSIGNED_INT_2_10_10_10_REV
</constant>
102 <term><parameter>values
</parameter></term>
105 A pointer to storage for the returned values.
111 <refsect1 id=
"description"><title>Description
</title>
113 <function>glGetMinmax
</function> returns the accumulated minimum and maximum pixel values (computed on a
114 per-component basis) in a one-dimensional image of width
2. The first set
115 of return values are the minima, and the second set of return values
117 The format of the return values is determined by
<parameter>format
</parameter>, and their type is
118 determined by
<parameter>types
</parameter>.
121 If a non-zero named buffer object is bound to the
<constant>GL_PIXEL_PACK_BUFFER
</constant> target
122 (see
<citerefentry><refentrytitle>glBindBuffer
</refentrytitle></citerefentry>) while minimum and maximum pixel values are
123 requested,
<parameter>values
</parameter> is treated as a byte offset into the buffer object's data store.
126 No pixel transfer operations are performed on the return values, but pixel
127 storage modes that are applicable to one-dimensional images are performed.
128 Color components that are requested in the specified
<parameter>format
</parameter>, but that
129 are not included in the internal format of the minmax table, are
130 returned as zero. The assignment of internal color components to the
131 components requested by
<parameter>format
</parameter> are as follows:
135 <informaltable frame=
"topbot">
136 <tgroup cols=
"2" align=
"left">
141 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
144 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
194 If
<parameter>reset
</parameter> is
<constant>GL_TRUE
</constant>, the minmax table entries corresponding
195 to the return values are reset to their initial
196 values. Minimum and maximum values that are not returned are not
197 modified, even if
<parameter>reset
</parameter> is
<constant>GL_TRUE
</constant>.
200 <refsect1 id=
"notes"><title>Notes
</title>
202 <function>glGetMinmax
</function> is present only if
<code>ARB_imaging
</code> is returned when
<citerefentry><refentrytitle>glGetString
</refentrytitle></citerefentry>
203 is called with an argument of
<constant>GL_EXTENSIONS
</constant>.
206 <refsect1 id=
"errors"><title>Errors
</title>
208 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not
<constant>GL_MINMAX
</constant>.
211 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>format
</parameter> is not one of the allowable
215 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>types
</parameter> is not one of the allowable
219 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>types
</parameter> is one of
220 <constant>GL_UNSIGNED_BYTE_3_3_2
</constant>,
221 <constant>GL_UNSIGNED_BYTE_2_3_3_REV
</constant>,
222 <constant>GL_UNSIGNED_SHORT_5_6_5
</constant>, or
223 <constant>GL_UNSIGNED_SHORT_5_6_5_REV
</constant>
224 and
<parameter>format
</parameter> is not
<constant>GL_RGB
</constant>.
227 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>types
</parameter> is one of
228 <constant>GL_UNSIGNED_SHORT_4_4_4_4
</constant>,
229 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV
</constant>,
230 <constant>GL_UNSIGNED_SHORT_5_5_5_1
</constant>,
231 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV
</constant>,
232 <constant>GL_UNSIGNED_INT_8_8_8_8
</constant>,
233 <constant>GL_UNSIGNED_INT_8_8_8_8_REV
</constant>,
234 <constant>GL_UNSIGNED_INT_10_10_10_2
</constant>, or
235 <constant>GL_UNSIGNED_INT_2_10_10_10_REV
</constant>
236 and
<parameter>format
</parameter> is neither
<constant>GL_RGBA
</constant> nor
<constant>GL_BGRA
</constant>.
239 <constant>GL_INVALID_OPERATION
</constant> is generated if a non-zero buffer object name is bound to the
240 <constant>GL_PIXEL_PACK_BUFFER
</constant> target and the buffer object's data store is currently mapped.
243 <constant>GL_INVALID_OPERATION
</constant> is generated if a non-zero buffer object name is bound to the
244 <constant>GL_PIXEL_PACK_BUFFER
</constant> target and the data would be packed to the buffer
245 object such that the memory writes required would exceed the data store size.
248 <constant>GL_INVALID_OPERATION
</constant> is generated if a non-zero buffer object name is bound to the
249 <constant>GL_PIXEL_PACK_BUFFER
</constant> target and
<parameter>values
</parameter> is not evenly divisible
250 into the number of bytes needed to store in memory a datum indicated by
<parameter>type
</parameter>.
253 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glGetMinmax
</function> is executed
254 between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry> and the corresponding
255 execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
258 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
260 <citerefentry><refentrytitle>glGetMinmaxParameter
</refentrytitle></citerefentry>
263 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_PIXEL_PACK_BUFFER_BINDING
</constant>
266 <refsect1 id=
"seealso"><title>See Also
</title>
268 <citerefentry><refentrytitle>glMinmax
</refentrytitle></citerefentry>,
269 <citerefentry><refentrytitle>glResetMinmax
</refentrytitle></citerefentry>,
272 <refsect1 id=
"Copyright"><title>Copyright
</title>
274 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
275 Silicon Graphics, Inc. This document is licensed under the SGI
276 Free Software B License. For details, see
277 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.