99 lines
2.7 KiB
Plaintext
99 lines
2.7 KiB
Plaintext
|
'\" te
|
||
|
'\"! tbl|eqn | 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 clear.gl
|
||
|
.ds Xs 16977 5 clear.gl
|
||
|
.TH GLCLEAR 3G
|
||
|
.SH NAME
|
||
|
.B "glClear
|
||
|
\- clear buffers to preset values
|
||
|
|
||
|
.SH C SPECIFICATION
|
||
|
void \f3glClear\fP(
|
||
|
GLbitfield \fImask\fP )
|
||
|
.nf
|
||
|
.fi
|
||
|
|
||
|
.SH PARAMETERS
|
||
|
.TP \w'\f2mask\fP\ \ 'u
|
||
|
\f2mask\fP
|
||
|
Bitwise OR of masks that indicate the buffers to be cleared.
|
||
|
The four masks are
|
||
|
\%\f3GL_COLOR_BUFFER_BIT\fP,
|
||
|
\%\f3GL_DEPTH_BUFFER_BIT\fP,
|
||
|
\%\f3GL_ACCUM_BUFFER_BIT\fP, and
|
||
|
\%\f3GL_STENCIL_BUFFER_BIT\fP.
|
||
|
.SH DESCRIPTION
|
||
|
\%\f3glClear\fP sets the bitplane area of the window to values previously selected
|
||
|
by \%\f3glClearColor\fP, \%\f3glClearIndex\fP, \%\f3glClearDepth\fP,
|
||
|
\%\f3glClearStencil\fP, and \%\f3glClearAccum\fP.
|
||
|
Multiple color buffers can be cleared simultaneously by selecting
|
||
|
more than one buffer at a time using \%\f3glDrawBuffer\fP.
|
||
|
.P
|
||
|
The pixel ownership test,
|
||
|
the scissor test,
|
||
|
dithering, and the buffer writemasks affect the operation of \%\f3glClear\fP.
|
||
|
The scissor box bounds the cleared region.
|
||
|
Alpha function,
|
||
|
blend function,
|
||
|
logical operation,
|
||
|
stenciling,
|
||
|
texture mapping,
|
||
|
and depth-buffering are ignored by \%\f3glClear\fP.
|
||
|
.P
|
||
|
\%\f3glClear\fP takes a single argument that is the bitwise OR of several
|
||
|
values indicating which buffer is to be cleared.
|
||
|
.P
|
||
|
The values are as follows:
|
||
|
.TP 28
|
||
|
\%\f3GL_COLOR_BUFFER_BIT\fP
|
||
|
Indicates the buffers currently enabled for color
|
||
|
writing.
|
||
|
.TP
|
||
|
\%\f3GL_DEPTH_BUFFER_BIT\fP
|
||
|
Indicates the depth buffer.
|
||
|
.TP
|
||
|
\%\f3GL_ACCUM_BUFFER_BIT\fP
|
||
|
Indicates the accumulation buffer.
|
||
|
.TP
|
||
|
\%\f3GL_STENCIL_BUFFER_BIT\fP
|
||
|
Indicates the stencil buffer.
|
||
|
.P
|
||
|
The value to which each buffer is cleared depends on the setting of the
|
||
|
clear value for that buffer.
|
||
|
.SH NOTES
|
||
|
If a buffer is not present,
|
||
|
then a \%\f3glClear\fP directed at that buffer has no effect.
|
||
|
.SH ERRORS
|
||
|
\%\f3GL_INVALID_VALUE\fP is generated if any bit other than the four defined
|
||
|
bits is set in \f2mask\fP.
|
||
|
.P
|
||
|
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glClear\fP
|
||
|
is executed between the execution of \%\f3glBegin\fP
|
||
|
and the corresponding execution of \%\f3glEnd\fP.
|
||
|
.SH ASSOCIATED GETS
|
||
|
\%\f3glGet\fP with argument \%\f3GL_ACCUM_CLEAR_VALUE\fP
|
||
|
.br
|
||
|
\%\f3glGet\fP with argument \%\f3GL_DEPTH_CLEAR_VALUE\fP
|
||
|
.br
|
||
|
\%\f3glGet\fP with argument \%\f3GL_INDEX_CLEAR_VALUE\fP
|
||
|
.br
|
||
|
\%\f3glGet\fP with argument \%\f3GL_COLOR_CLEAR_VALUE\fP
|
||
|
.br
|
||
|
\%\f3glGet\fP with argument \%\f3GL_STENCIL_CLEAR_VALUE\fP
|
||
|
.SH SEE ALSO
|
||
|
\%\f3glClearAccum(3G)\fP,
|
||
|
\%\f3glClearColor(3G)\fP,
|
||
|
\%\f3glClearDepth(3G)\fP,
|
||
|
\%\f3glClearIndex(3G)\fP,
|
||
|
\%\f3glClearStencil(3G)\fP,
|
||
|
\%\f3glColorMask(3G)\fP,
|
||
|
\%\f3glDepthMask(3G)\fP,
|
||
|
\%\f3glDrawBuffer(3G)\fP,
|
||
|
\%\f3glScissor(3G)\fP,
|
||
|
\%\f3glStencilMask(3G)\fP
|