DrawCommand

DrawCommand

new

Represents a command to the renderer for drawing.

See:
Source:

Members

:Object

The bounding volume of the geometry. This is used for culling and frustum selection.

For best rendering performance, use the tightest possible bounding volume. Although undefined is allowed, always try to provide a bounding volume to allow the tightest possible near and far planes to be computed for the scene, and minimize the number of frustums needed.

Default Value:
  • undefined
See:

:Number

The number of vertices to draw in the vertex array.
Default Value:
  • undefined

:Boolean

When true, the renderer frustum and horizon culls the command based on its DrawCommand#boundingVolume. If the command was already culled, set this to false for a performance improvement.
Default Value:
  • true

:Boolean

This property is for debugging only; it is not for production use nor is it optimized.

Draws the DrawCommand#boundingVolume for this command, assuming it is a sphere, when the command executes.

Default Value:
  • false
See:

:Boolean

Specifies if this command is only to be executed in the frustum closest to the eye containing the bounding volume. Defaults to false.
Default Value:
  • false

:Framebuffer

The framebuffer to draw to.
Default Value:
  • undefined

:Matrix4

The transformation from the geometry in model space to world space.

When undefined, the geometry is assumed to be defined in world space.

Default Value:
  • undefined

:Number

The offset to start drawing in the vertex array.
Default Value:
  • undefined

:Object

The object who created this command. This is useful for debugging command execution; it allows us to see who created a command when we only have a reference to the command, and can be used to selectively execute commands with Scene#debugCommandFilter.
Default Value:
  • undefined
See:

:PrimitiveType

The type of geometry in the vertex array.
Default Value:
  • undefined

:RenderState

The render state.
Default Value:
  • undefined
See:

:ShaderProgram

The shader program to apply.
Default Value:
  • undefined

:Object

An object with functions whose names match the uniforms in the shader program and return values to set those uniforms.
Default Value:
  • undefined

:VertexArray

The vertex array.
Default Value:
  • undefined

Methods

Executes the draw command.

Parameters:
Name Type Argument Description
context Context The renderer context in which to draw.
passState PassState <optional>
TBA.