NAME
glClear
- clear buffers to preset values
C SPECIFICATION
void ggllCClleeaarr(
GLbitfield _m_a_s_k )
PARAMETERS
-
_m_a_s_k
-
Bitwise OR of masks that indicate the buffers to be cleared.
The four masks are
GGLL__CCOOLLOORR__BBUUFFFFEERR__BBIITT,
GGLL__DDEEPPTTHH__BBUUFFFFEERR__BBIITT,
GGLL__AACCCCUUMM__BBUUFFFFEERR__BBIITT, and
GGLL__SSTTEENNCCIILL__BBUUFFFFEERR__BBIITT.
DESCRIPTION
ggllCClleeaarr sets the bitplane area of the window to values previously selected
by ggllCClleeaarrCCoolloorr, ggllCClleeaarrIInnddeexx, ggllCClleeaarrDDeepptthh,
ggllCClleeaarrSStteenncciill, and ggllCClleeaarrAAccccuumm.
Multiple color buffers can be cleared simultaneously by selecting
more than one buffer at a time using ggllDDrraawwBBuuffffeerr.
The pixel ownership test,
the scissor test,
dithering, and the buffer writemasks affect the operation of ggllCClleeaarr.
The scissor box bounds the cleared region.
Alpha function,
blend function,
logical operation,
stenciling,
texture mapping,
and depth-buffering are ignored by ggllCClleeaarr.
ggllCClleeaarr takes a single argument that is the bitwise OR of several
values indicating which buffer is to be cleared.
The values are as follows:
-
GGLL__CCOOLLOORR__BBUUFFFFEERR__BBIITT
-
Indicates the buffers currently enabled for color
writing.
-
GGLL__DDEEPPTTHH__BBUUFFFFEERR__BBIITT
-
Indicates the depth buffer.
-
GGLL__AACCCCUUMM__BBUUFFFFEERR__BBIITT
-
Indicates the accumulation buffer.
-
GGLL__SSTTEENNCCIILL__BBUUFFFFEERR__BBIITT
-
Indicates the stencil buffer.
The value to which each buffer is cleared depends on the setting of the
clear value for that buffer.
NOTES
If a buffer is not present,
then a ggllCClleeaarr directed at that buffer has no effect.
ERRORS
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if any bit other than the four defined
bits is set in _m_a_s_k.
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllCClleeaarr
is executed between the execution of ggllBBeeggiinn
and the corresponding execution of ggllEEnndd.
ASSOCIATED GETS
ggllGGeett with argument GGLL__AACCCCUUMM__CCLLEEAARR__VVAALLUUEE
ggllGGeett with argument GGLL__DDEEPPTTHH__CCLLEEAARR__VVAALLUUEE
ggllGGeett with argument GGLL__IINNDDEEXX__CCLLEEAARR__VVAALLUUEE
ggllGGeett with argument GGLL__CCOOLLOORR__CCLLEEAARR__VVAALLUUEE
ggllGGeett with argument GGLL__SSTTEENNCCIILL__CCLLEEAARR__VVAALLUUEE
SEE ALSO
ggllCClleeaarrAAccccuumm((33GG)),
ggllCClleeaarrCCoolloorr((33GG)),
ggllCClleeaarrDDeepptthh((33GG)),
ggllCClleeaarrIInnddeexx((33GG)),
ggllCClleeaarrSStteenncciill((33GG)),
ggllCCoolloorrMMaasskk((33GG)),
ggllDDeepptthhMMaasskk((33GG)),
ggllDDrraawwBBuuffffeerr((33GG)),
ggllSScciissssoorr((33GG)),
ggllSStteenncciillMMaasskk((33GG))