Skip to content

LiteFX::Rendering::ICommandBuffer::drawIndexed

Draws the currently bound vertex buffer using the index buffer provided in indexBuffer.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] void drawIndexed(
    IIndexBuffer const& indexBuffer,
    UInt32 instances = 1,
    UInt32 firstIndex = 0,
    Int32 vertexOffset = 0,
    UInt32 firstInstance = 0) const;

Description

This helper method binds the index buffer and issues a draw command for all indices.

Parameters

NameDescription
indexBufferThe index buffer to draw with.
instancesThe number of instances to draw.
firstIndexThe index of the first element of the index buffer to start drawing from.
vertexOffsetThe offset added to each index to find the corresponding vertex.
firstInstanceThe index of the first instance to draw.