Clear

Definition
The clear method clears buffers to preset values specified by clearColor, clearDepth and clearStencil.

Syntax

 * gl.clear(mask)

Parameters

 * mask: bitwise OR of masks that indicate the buffers to be cleared, the three masks are gl.COLOR_BUFFER_BIT, gl.DEPTH_BUFFER_BIT and gl.STENCIL_BUFFER_BIT
 * Note: Unlike OpenGL, the mask gl.ACCUM_BUFFER_BIT is not supported in WebGL.

Examples

 * // Clears the color and depth buffers
 * gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);


 * // Clears the depth buffer
 * gl.clear(gl.DEPTH_BUFFER_BIT);