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

NAME

6       glClear - clear buffers to preset values
7

C SPECIFICATION

9       void glClear(GLbitfield mask);
10

PARAMETERS

12       mask
13           Bitwise OR of masks that indicate the buffers to be cleared. The
14           three masks are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and
15           GL_STENCIL_BUFFER_BIT.
16

DESCRIPTION

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

NOTES

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

ERRORS

51       GL_INVALID_VALUE is generated if any bit other than the three defined
52       bits is set in mask.
53

ASSOCIATED GETS

55       glGet() with argument GL_DEPTH_CLEAR_VALUE
56
57       glGet() with argument GL_COLOR_CLEAR_VALUE
58
59       glGet() with argument GL_STENCIL_CLEAR_VALUE
60

SEE ALSO

62       glClearColor, glClearDepth, glClearStencil, glColorMask(),
63       glDepthMask(), glDrawBuffer(), glScissor(), glStencilMask()
64
66       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
67       under the SGI Free Software B License. For details, see
68       http://oss.sgi.com/projects/FreeB/.
69

AUTHORS

71       opengl.org
72
73
74
75opengl.org                        06/10/2014                       GLCLEAR(3G)
Impressum