'\"! tbl|eqn | mmdoc '\"macro stdmacro .ds Vn Version 1.2 .ds Dt 6 March 1997 .ds Re Release 1.1.0 .ds Dp Mar 17 18:03 .ds Dm Mar 6 20:0 .ds Xs 9991 5 clear.gl .TH GLCLEAR .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 26 \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\fP, \f3glClearColor\fP, \f3glClearDepth\fP, \f3glClearIndex\fP, \f3glClearStencil\fP, \f3glDrawBuffer\fP, \f3glScissor\fP