xenocara/doc/gl-docs/GL/gl/minmax.3gl
2006-11-29 17:00:35 +00:00

121 lines
3.6 KiB
Plaintext

'\" t
'\"! tbl | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 minmax.gl
.ds Xs 45595 6 minmax.gl
.TH GLMINMAX 3G
.SH NAME
.B "glMinmax
\- define minmax table
.SH C SPECIFICATION
void \f3glMinmax\fP(
GLenum \fItarget\fP,
.nf
.ta \w'\f3void \fPglMinmax( 'u
GLenum \fIinternalformat\fP,
GLboolean \fIsink\fP )
.fi
.SH PARAMETERS
.TP \w'\fIinternalformat\fP\ \ 'u
\f2target\fP
The minmax table whose parameters are to be set.
Must be
\%\f3GL_MINMAX\fP.
.TP
\f2internalformat\fP
The of entries in the minmax table.
Must be one of
\%\f3GL_ALPHA\fP,
\%\f3GL_ALPHA4\fP,
\%\f3GL_ALPHA8\fP,
\%\f3GL_ALPHA12\fP,
\%\f3GL_ALPHA16\fP,
\%\f3GL_LUMINANCE\fP,
\%\f3GL_LUMINANCE4\fP,
\%\f3GL_LUMINANCE8\fP,
\%\f3GL_LUMINANCE12\fP,
\%\f3GL_LUMINANCE16\fP,
\%\f3GL_LUMINANCE_ALPHA\fP,
\%\f3GL_LUMINANCE4_ALPHA4\fP,
\%\f3GL_LUMINANCE6_ALPHA2\fP,
\%\f3GL_LUMINANCE8_ALPHA8\fP,
\%\f3GL_LUMINANCE12_ALPHA4\fP,
\%\f3GL_LUMINANCE12_ALPHA12\fP,
\%\f3GL_LUMINANCE16_ALPHA16\fP,
\%\f3GL_R3_G3_B2\fP,
\%\f3GL_RGB\fP,
\%\f3GL_RGB4\fP,
\%\f3GL_RGB5\fP,
\%\f3GL_RGB8\fP,
\%\f3GL_RGB10\fP,
\%\f3GL_RGB12\fP,
\%\f3GL_RGB16\fP,
\%\f3GL_RGBA\fP,
\%\f3GL_RGBA2\fP,
\%\f3GL_RGBA4\fP,
\%\f3GL_RGB5_A1\fP,
\%\f3GL_RGBA8\fP,
\%\f3GL_RGB10_A2\fP,
\%\f3GL_RGBA12\fP, or
\%\f3GL_RGBA16\fP.
.TP
\f2sink\fP
If \%\f3GL_TRUE\fP, pixels will be consumed by the minmax
process and no drawing or texture loading will take place.
If \%\f3GL_FALSE\fP, pixels will proceed to the final conversion process after
minmax.
.SH DESCRIPTION
When \%\f3GL_MINMAX\fP is enabled, the RGBA components of incoming pixels are
compared to the minimum and maximum values for each component, which are
stored in the 2-element minmax table.
(The first element stores the minima, and the second element stores
the maxima.)
If a pixel component is greater than the corresponding component
in the maximum element, then the maximum element is updated with the
pixel component value.
If a pixel component is less than the corresponding component in
the minimum element, then the minimum element is updated with the
pixel component value.
(In both cases, if the internal of the minmax table includes
luminance, then the R color component of incoming pixels is used
for comparison.)
The contents of the minmax table may be retrieved at a later time
by calling \%\f3glGetMinmax\fP.
The minmax operation is enabled or disabled by calling \%\f3glEnable\fP or
\%\f3glDisable\fP, respectively, with an argument of \%\f3GL_MINMAX\fP.
.P
\%\f3glMinmax\fP redefines the current minmax table to have entries of the
specified by \f2internalformat\fP.
The maximum element is initialized with the smallest possible component
values, and the minimum element is initialized with the largest possible
component values.
The values in the previous minmax table, if any, are lost.
If \f2sink\fP is \%\f3GL_TRUE\fP, then pixels are discarded after minmax;
no further processing of the pixels takes place, and no drawing,
texture loading, or pixel readback will result.
.P
.SH NOTES
\%\f3glMinmax\fP is present only if \%\f3GL_ARB_imaging\fP is returned when \%\f3glGetString\fP
is called with an argument of \%\f3GL_EXTENSIONS\fP.
.SH ERRORS
\%\f3GL_INVALID_ENUM\fP is generated if \f2target\fP is not one of the allowable
values.
.P
\%\f3GL_INVALID_ENUM\fP is generated if \f2internalformat\fP is not one of the
allowable values.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glMinmax\fP is executed
between the execution of \%\f3glBegin\fP and the corresponding
execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGetMinmaxParameter\fP
.SH SEE ALSO
\%\f3glGetMinmax(3G)\fP,
\%\f3glResetMinmax(3G)\fP