Skip to content

LiteFX::Rendering::CommandBuffer::draw

Draws all vertices from the vertex buffer provided in vertexBuffer.

Synopsis

Declared in <litefx/rendering.hpp>

virtual void draw(
    vertex_buffer_type const& vertexBuffer,
    UInt32 instances = 1,
    UInt32 firstVertex = 0,
    UInt32 firstInstance = 0) const;

Description

This helper method binds the vertex buffer and issues a draw command for all vertices.

Parameters

NameDescription
vertexBufferThe vertex buffer to draw from.
instancesThe number of instances to draw.
firstVertexThe index of the first vertex to start drawing from.
firstInstanceThe index of the first instance to draw.