5
.ds Dt 24 September 1999
9
.ds Xs 16977 5 clear.gl
13
\- clear buffers to preset values
17
GLbitfield \fImask\fP )
22
.TP \w'\f2mask\fP\ \ 'u
24
Bitwise OR of masks that indicate the buffers to be cleared.
26
\%\f3GL_COLOR_BUFFER_BIT\fP,
27
\%\f3GL_DEPTH_BUFFER_BIT\fP,
28
\%\f3GL_ACCUM_BUFFER_BIT\fP, and
29
\%\f3GL_STENCIL_BUFFER_BIT\fP.
31
\%\f3glClear\fP sets the bitplane area of the window to values previously selected
32
by \%\f3glClearColor\fP, \%\f3glClearIndex\fP, \%\f3glClearDepth\fP,
33
\%\f3glClearStencil\fP, and \%\f3glClearAccum\fP.
34
Multiple color buffers can be cleared simultaneously by selecting
35
more than one buffer at a time using \%\f3glDrawBuffer\fP.
37
The pixel ownership test,
39
dithering, and the buffer writemasks affect the operation of \%\f3glClear\fP.
40
The scissor box bounds the cleared region.
46
and depth-buffering are ignored by \%\f3glClear\fP.
48
\%\f3glClear\fP takes a single argument that is the bitwise OR of several
49
values indicating which buffer is to be cleared.
51
The values are as follows:
53
\%\f3GL_COLOR_BUFFER_BIT\fP
54
Indicates the buffers currently enabled for color
57
\%\f3GL_DEPTH_BUFFER_BIT\fP
58
Indicates the depth buffer.
60
\%\f3GL_ACCUM_BUFFER_BIT\fP
61
Indicates the accumulation buffer.
63
\%\f3GL_STENCIL_BUFFER_BIT\fP
64
Indicates the stencil buffer.
66
The value to which each buffer is cleared depends on the setting of the
67
clear value for that buffer.
69
If a buffer is not present,
70
then a \%\f3glClear\fP directed at that buffer has no effect.
72
\%\f3GL_INVALID_VALUE\fP is generated if any bit other than the four defined
73
bits is set in \f2mask\fP.
75
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glClear\fP
76
is executed between the execution of \%\f3glBegin\fP
77
and the corresponding execution of \%\f3glEnd\fP.
79
\%\f3glGet\fP with argument \%\f3GL_ACCUM_CLEAR_VALUE\fP
81
\%\f3glGet\fP with argument \%\f3GL_DEPTH_CLEAR_VALUE\fP
83
\%\f3glGet\fP with argument \%\f3GL_INDEX_CLEAR_VALUE\fP
85
\%\f3glGet\fP with argument \%\f3GL_COLOR_CLEAR_VALUE\fP
87
\%\f3glGet\fP with argument \%\f3GL_STENCIL_CLEAR_VALUE\fP
89
\%\f3glClearAccum(3G)\fP,
90
\%\f3glClearColor(3G)\fP,
91
\%\f3glClearDepth(3G)\fP,
92
\%\f3glClearIndex(3G)\fP,
93
\%\f3glClearStencil(3G)\fP,
94
\%\f3glColorMask(3G)\fP,
95
\%\f3glDepthMask(3G)\fP,
96
\%\f3glDrawBuffer(3G)\fP,
97
\%\f3glScissor(3G)\fP,
98
\%\f3glStencilMask(3G)\fP