FANDOM


DefinitionEdit

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

SyntaxEdit

gl.clear(mask)

ParametersEdit

ExamplesEdit

// 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);

See alsoEdit