new DrawCommand
Represents a command to the renderer for drawing.
See:
Source:
Members
-
boundingVolume :Object
-
The bounding volume of the geometry in world space. 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:
-
count :Number
-
The number of vertices to draw in the vertex array.
- Default Value:
- undefined
-
cull :Boolean
-
When
true
, the renderer frustum and horizon culls the command based on its DrawCommand#boundingVolume. If the command was already culled, set this tofalse
for a performance improvement.- Default Value:
- true
-
debugShowBoundingVolume :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:
-
executeInClosestFrustum :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 :Framebuffer
-
The framebuffer to draw to.
- Default Value:
- undefined
-
modelMatrix :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
-
offset :Number
-
The offset to start drawing in the vertex array.
- Default Value:
- undefined
-
owner :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:
-
pass :Pass
-
The pass when to render.
- Default Value:
- undefined
-
primitiveType :PrimitiveType
-
The type of geometry in the vertex array.
- Default Value:
- undefined
-
renderState :RenderState
-
The render state.
- Default Value:
- undefined
See:
-
shaderProgram :ShaderProgram
-
The shader program to apply.
- Default Value:
- undefined
-
uniformMap :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 :VertexArray
-
The vertex array.
- Default Value:
- undefined
Methods
-
execute
-
Executes the draw command.
Parameters:
Name Type Argument Description context
Context The renderer context in which to draw. passState
PassState <optional>
The state for the current render pass. renderState
RenderState <optional>
The render state that will override the render state of the command. shaderProgram
ShaderProgram <optional>
The shader program that will override the shader program of the command.