1GLCLEAR(3G)                                                        GLCLEAR(3G)
2
3
4

NAME

6       glClear - clear buffers to preset values
7
8

C SPECIFICATION

10       void glClear( GLbitfield mask )
11
12

PARAMETERS

14       mask  Bitwise OR of masks that indicate the buffers to be cleared.  The
15             four   masks   are   GL_COLOR_BUFFER_BIT,    GL_DEPTH_BUFFER_BIT,
16             GL_ACCUM_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT.
17

DESCRIPTION

19       glClear  sets  the  bitplane  area  of  the window to values previously
20       selected by glClearColor, glClearIndex,  glClearDepth,  glClearStencil,
21       and glClearAccum.  Multiple color buffers can be cleared simultaneously
22       by selecting more than one buffer at a time using glDrawBuffer.
23
24       The pixel ownership test, the scissor test, dithering, and  the  buffer
25       writemasks affect the operation of glClear.  The scissor box bounds the
26       cleared region.  Alpha function,  blend  function,  logical  operation,
27       stenciling,   texture  mapping,  and  depth-buffering  are  ignored  by
28       glClear.
29
30       glClear takes a single argument that is the bitwise OR of several  val‐
31       ues indicating which buffer is to be cleared.
32
33       The values are as follows:
34
35       GL_COLOR_BUFFER_BIT         Indicates the buffers currently enabled for
36                                   color writing.
37
38       GL_DEPTH_BUFFER_BIT         Indicates the depth buffer.
39
40       GL_ACCUM_BUFFER_BIT         Indicates the accumulation buffer.
41
42       GL_STENCIL_BUFFER_BIT       Indicates the stencil buffer.
43
44       The value to which each buffer is cleared depends on the setting of the
45       clear value for that buffer.
46

NOTES

48       If  a buffer is not present, then a glClear directed at that buffer has
49       no effect.
50

ERRORS

52       GL_INVALID_VALUE is generated if any bit other than  the  four  defined
53       bits is set in mask.
54
55       GL_INVALID_OPERATION  is  generated  if glClear is executed between the
56       execution of glBegin and the corresponding execution of glEnd.
57

ASSOCIATED GETS

59       glGet with argument GL_ACCUM_CLEAR_VALUE
60       glGet with argument GL_DEPTH_CLEAR_VALUE
61       glGet with argument GL_INDEX_CLEAR_VALUE
62       glGet with argument GL_COLOR_CLEAR_VALUE
63       glGet with argument GL_STENCIL_CLEAR_VALUE
64

SEE ALSO

66       glClearAccum(3G), glClearColor(3G), glClearDepth(3G), glClearIndex(3G),
67       glClearStencil(3G), glColorMask(3G), glDepthMask(3G), glDrawBuffer(3G),
68       glScissor(3G), glStencilMask(3G)
69
70
71
72                                                                   GLCLEAR(3G)
Impressum