Graphics Reference
In-Depth Information
void glClear (GLbitfield mask )
specifies the buffers to be cleared, and is composed of the union
of the following bitmasks representing the various OpenGL ES
buffers: GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT ,
GL_STENCIL_BUFFER_BIT
mask
You're required neither to clear every buffer nor to clear them all at the
same time, but you might obtain the best performance by calling glClear
only once per frame with all the buffers you want simultaneously cleared.
Each buffer has a default value that's used when you request that buffer be
cleared. For each buffer, you can specify your desired clear value using the
functions shown here:
void glClearColor (GLfloat red , GLfloat green ,
GLfloat blue , GLfloat alpha )
red, green, specifies the color value (in the range [0, 1]) that all
blue,
pixels in the color buffers should be initialized to when
GL_COLOR_BUFFER_BIT is present in the bitmask passed
to glClear
alpha
void glClearDepthf (GLfloat depth )
specifies the depth value (in the range [0, 1]) that all pixels in
the depth buffer should be initialized to when
GL_DEPTH_BUFFER_BIT is present in the bitmask passed
to  glClear
depth
void glClearStencil (GLint s )
specifies the stencil value (in the range [0, 2 n - 1], where n is
the number of bits available in the stencil buffer) that all pixels
in the stencil buffer should be initialized to when
GL_STENCIL_BUFFER_BIT is present in the bitmask passed
to  glClear
s
 
 
Search WWH ::




Custom Search