ClearCommand

ClearCommand

new ClearCommand

Represents a command to the renderer for clearing a framebuffer.

See:

Members

color :Color

The value to clear the color buffer to. When undefined, the color buffer is not cleared.
Default Value:
  • undefined

depth :Number

The value to clear the depth buffer to. When undefined, the depth buffer is not cleared.
Default Value:
  • undefined

framebuffer :Framebuffer

The framebuffer to clear.
Default Value:
  • undefined

renderState :Object

The render state to apply when executing the clear command. The following states affect clearing: scissor test, color mask, depth mask, stencil mask, and dither. When the render state is undefined, the default render state is used.
Default Value:
  • undefined
See:

stencil :Number

The value to clear the stencil buffer to. When undefined, the stencil buffer is not cleared.
Default Value:
  • undefined

<static, constant> ALL :ClearCommand

Clears color to (0.0, 0.0, 0.0, 0.0); depth to 1.0; and stencil to 0.

Methods

execute

Executes the clear command.

Parameters:
Name Type Argument Description
context Context The renderer context in which to clear.
passState PassState <optional>
The state for the current rendering pass.