GLMINMAXEXT(3GL)GLMINMAXEXT(3GL)NAME
glMinmaxEXT, glResetMinmaxEXT - specify minmax parameters and reset
internal representation of minmax
C SPECIFICATION
void glMinmaxEXT ( GLenum target,
GLenum internalformat,
GLboolean sink)
PARAMETERS
target The target minax to be defined. Must be GL_MINMAX_EXT
or GL_PROXY_HISTOGRAM_EXT.
internalformat The internal storage format of minmax values.
sink Specifies whether pixel groups will be consumed by the
minmax operation (GL_TRUE) or passed on to pixel ras‐
torization (GL_FALSE).
C SPECIFICATION
void glResetMinmaxEXT ( GLenum target)
PARAMETERS
target The target minmax to be reset. Must be GL_MINMAX_EXT.
DESCRIPTION
glMinmaxEXT and glResetMinmaxEXT are part of the EXT_histogram exten‐
sion, which defines histogram and minmax operations at a fixed location
in the pixel transfer pipeline after convolution and post convolution
colortable.
The minmax operation immediately follows the histogram operation, but
will only be executed if both the histogram and minmax operations are
enabled. Also, if the sink value for histogram is set to GL_TRUE, then
the minmax operation will not be executed.
A minmax table is specified using the glMinmaxEXT command. Its <tar‐
get> parameter must be GL_MINMAX_EXT. <internalformat> may be any of
the token values accepted by the <components> parameter of glTexIm‐
age2D, except that 1, 2, 3, 4, GL_INTENSITY_EXT, GL_INTENSITY4_EXT,
GL_INTENSITY8_EXT, GL_INTENSITY12_EXT, and GL_INTENSITY16_EXT are not
accepted. <sink> is set to GL_TRUE or GL_FALSE. The resulting minmax
table always has 2 entries, each with values corresponding only to the
components of the internal format.
glResetMinmaxEXT resets the internal representation of minmax to all
zeros.
Minmax is Enabled glEnable(GL_MINMAX_EXT). Use glDisable(GL_MINMAX_EXT)
to disable minmax. Use glIsEnabled(GL_MINMAX_EXT) to check if minmax is
enabled or not.
Minmax operations are performed only for RGBA pixel groups, though
these groups may have been specified as color indices and converted to
RGBA by index table lookup.
If GL_MINMAX_EXT is enabled, and the pixel groups contain RGBA values,
then the red, green, blue, and alpha components of each group are com‐
pared to the minimum and maximum values for each, which are stored in
the 2-element minmax table. (The first element stores the minimum val‐
ues, the second stores the maximum values.) If the format of this ta‐
ble includes red or luminance, the red component value replaces the red
or luminance value in the minimum table element if and only if it is
less than that component. Likewise, if the format includes red or lumi‐
nance and the red component of the group is greater than the red or
luminance value in the maximum element, the red group component
replaces the red or luminance maximum component.
If the format of the table includes green, the green group component
conditionally replaces the green minimum and/or maximum if it is
smaller or larger, respectively. The blue and alpha group components
are similarly tested and replaced, if the table format includes blue
and/or alpha. The internal type of the minimum and maximum component
values is floating point. There are no semantics defined for the treat‐
ment of group component values that are outside the representable range
of the minimum and maximum values.
By default histogram and minmax operations have no effect on the stream
of pixel groups being processed. If GL_HISTOGRAM_EXT is enabled and the
histogram <sink> parameter was specified as GL_TRUE, however, all RGBA
pixel groups are discarded immediately after the histogram operation is
completed. Because histogram precedes minmax, no minmax operation is
performed. No pixel fragments are generated, no change is made to tex‐
ture memory contents, and no pixel values are returned. If GL_MIN‐
MAX_EXT is enabled and the minmax <sink> parameter was specified as
GL_TRUE, all RGBA pixel groups are discarded immediately after the min‐
max operation is completed. Because minmax follows histogram, a his‐
togram operation with <sink> set to GL_FALSE may precede such a minmax
operation. Again no pixel fragments are generated, no change is made to
texture memory contents, and no pixel values are returned.
The operation of minmax during pixel copy and query operations is iden‐
tical to the operation during pixel drawing and texture image defini‐
tion.
ERRORS
GL_INVALID_ENUM is generated if glMinmaxEXT parameter <target> is not
GL_MINMAX_EXT.
GL_INVALID_ENUM is generated if glMinmaxEXT parameter <internalformat>
is not GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMI‐
NANCE, GL_LUMINANCE_ALPHA and GL_ABGR_EXT, or one of the tokens defined
by the EXT_texture extension. (Values 1, 2, 3, 4, GL_INTENSITY_EXT,
GL_INTENSITY4_EXT, GL_INTENSITY8_EXT, GL_INTENSITY12_EXT, and GL_INTEN‐
SITY16_EXT are not accepted as internal formats by glMinmaxEXT).
GL_INVALID_ENUM is generated if glResetMinmaxEXT parameter <target> is
not GL_MINMAX_EXT.
GL_INVALID_OPERATION is generated if MinmaxEXT and ResetMinmaxEXT are
called between execution of glBegin and the corresponding execution of
glEnd.
ASSOCIATED GETS
glGetMinmaxEXT, glGetMinmaxParameterivEXT, and glGetMinmaxParameter‐
fvEXT
SEE ALSO
glHistogramEXT, glResetHistogramEXT, glGetHistogramEXT, glGetHistogram‐
ParameterivEXT, glGetHistogramParameterfvEXT, glDrawPixels, glCopyPix‐
els, glReadPixels, glTexImage2D, glTexImage3DEXT, glTexSubImage2DEXT,
glCopyTexImage2DEXT, glCopyTexSubImage2DEXT, glGetTexImage, glPixel‐
Tranferf, glPixelTransferi, glEnable, glDisable, glIsEnabled, glPixel‐
Store.
1 Dec 97 GLMINMAXEXT(3GL)