class render::DrawCommand

Contains all information needed for rendering a single sub-mesh.

Closely tied with Renderer.

Public

Methods

Draw

virtual void Draw(GpuCommandBuffer &commandBuffer) const = 0

Encodes the draw call for the render element.

Fields

Mesh

SPtr<Mesh> Mesh

Reference to the mesh to render.

SubMesh

Portion of the mesh to render.

Material

Material to render the mesh with.

DefaultVariationIndex

u32 DefaultVariationIndex

Index of the variation in the material to render the element with.

WriteVelocityVariationIndex

u32 WriteVelocityVariationIndex

Index of the variation in the material to render the element with when velocity writes are supported.

ParameterAdapter

SPtr<MaterialParameterAdapter> ParameterAdapter

All GPU parameters from the material used by the renderable.

SharedPerObjectParameterSet

SPtr<GpuParameterSet> SharedPerObjectParameterSet

Shared parameter set for per-object data (set #1), bound at render time.

PerObjectBufferOffset

u32 PerObjectBufferOffset

Byte offset of this element's per-object data within the shared buffer.

Type

u32 Type

Renderer specific value that identifies the type of this renderable element.

Protected

Methods

~DrawCommand

virtual ~DrawCommand() = default