/
glGetMinmax.xml
280 lines (280 loc) · 13.1 KB
/
glGetMinmax.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glGetMinmax">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>glGetMinmax</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glGetMinmax</refname>
<refpurpose>get minimum and maximum pixel values</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glGetMinmax</function></funcdef>
<paramdef>GLenum <parameter>target</parameter></paramdef>
<paramdef>GLboolean <parameter>reset</parameter></paramdef>
<paramdef>GLenum <parameter>format</parameter></paramdef>
<paramdef>GLenum <parameter>types</parameter></paramdef>
<paramdef>GLvoid * <parameter>values</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>target</parameter></term>
<listitem>
<para>
Must be
<constant>GL_MINMAX</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>reset</parameter></term>
<listitem>
<para>
If <constant>GL_TRUE</constant>, all entries in the minmax table that are actually
returned are reset to their initial values. (Other entries are unaltered.)
If <constant>GL_FALSE</constant>, the minmax table is unaltered.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
The format of the data to be returned in <parameter>values</parameter>.
Must be one of
<constant>GL_RED</constant>,
<constant>GL_GREEN</constant>,
<constant>GL_BLUE</constant>,
<constant>GL_ALPHA</constant>,
<constant>GL_RGB</constant>,
<constant>GL_BGR</constant>,
<constant>GL_RGBA</constant>,
<constant>GL_BGRA</constant>,
<constant>GL_LUMINANCE</constant>, or
<constant>GL_LUMINANCE_ALPHA</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>types</parameter></term>
<listitem>
<para>
The type of the data to be returned in <parameter>values</parameter>.
Symbolic constants
<constant>GL_UNSIGNED_BYTE</constant>,
<constant>GL_BYTE</constant>,
<constant>GL_BITMAP</constant>,
<constant>GL_UNSIGNED_SHORT</constant>,
<constant>GL_SHORT</constant>,
<constant>GL_UNSIGNED_INT</constant>,
<constant>GL_INT</constant>,
<constant>GL_FLOAT</constant>,
<constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
<constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
<constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
<constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
<constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
are accepted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>values</parameter></term>
<listitem>
<para>
A pointer to storage for the returned values.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
<function>glGetMinmax</function> returns the accumulated minimum and maximum pixel values (computed on a
per-component basis) in a one-dimensional image of width 2. The first set
of return values are the minima, and the second set of return values
are the maxima.
The format of the return values is determined by <parameter>format</parameter>, and their type is
determined by <parameter>types</parameter>.
</para>
<para>
If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
(see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while minimum and maximum pixel values are
requested, <parameter>values</parameter> is treated as a byte offset into the buffer object's data store.
</para>
<para>
No pixel transfer operations are performed on the return values, but pixel
storage modes that are applicable to one-dimensional images are performed.
Color components that are requested in the specified <parameter>format</parameter>, but that
are not included in the internal format of the minmax table, are
returned as zero. The assignment of internal color components to the
components requested by <parameter>format</parameter> are as follows:
</para>
<para>
</para>
<informaltable frame="topbot">
<tgroup cols="2" align="left">
<colspec/>
<colspec/>
<thead>
<row>
<entry rowsep="1" align="left"><emphasis role="bold">
Internal Component
</emphasis></entry>
<entry rowsep="1" align="left"><emphasis role="bold">
Resulting Component
</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry align="left">
Red
</entry>
<entry align="left">
Red
</entry>
</row>
<row>
<entry align="left">
Green
</entry>
<entry align="left">
Green
</entry>
</row>
<row>
<entry align="left">
Blue
</entry>
<entry align="left">
Blue
</entry>
</row>
<row>
<entry align="left">
Alpha
</entry>
<entry align="left">
Alpha
</entry>
</row>
<row>
<entry align="left">
Luminance
</entry>
<entry align="left">
Red
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
If <parameter>reset</parameter> is <constant>GL_TRUE</constant>, the minmax table entries corresponding
to the return values are reset to their initial
values. Minimum and maximum values that are not returned are not
modified, even if <parameter>reset</parameter> is <constant>GL_TRUE</constant>.
</para>
</refsect1>
<refsect1 id="notes"><title>Notes</title>
<para>
<function>glGetMinmax</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>
is called with an argument of <constant>GL_EXTENSIONS</constant>.
</para>
</refsect1>
<refsect1 id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_MINMAX</constant>.
</para>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not one of the allowable
values.
</para>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>types</parameter> is not one of the allowable
values.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>types</parameter> is one of
<constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
<constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
<constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>types</parameter> is one of
<constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
<constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
<constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
<constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
<constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
<constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
<constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
object such that the memory writes required would exceed the data store size.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
<constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>values</parameter> is not evenly divisible
into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetMinmax</function> is executed
between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
</para>
</refsect1>
<refsect1 id="associatedgets"><title>Associated Gets</title>
<para>
<citerefentry><refentrytitle>glGetMinmaxParameter</refentrytitle></citerefentry>
</para>
<para>
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glResetMinmax</refentrytitle></citerefentry>,
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>