LiteFX::Rendering::ICommandBuffer::drawIndexed¶
Draws the vertex buffer provided by vertexBuffer using the index buffer, provided by indexBuffer.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
[[dllimport, dllexport]] void drawIndexed(
IVertexBuffer const& vertexBuffer,
IIndexBuffer const& indexBuffer,
UInt32 instances = 1,
UInt32 firstIndex = 0,
Int32 vertexOffset = 0,
UInt32 firstInstance = 0) const;
Description¶
This helper method binds the provided vertex and index buffers and issues a draw command for all indices.
Parameters¶
| Name | Description |
|---|---|
| vertexBuffer | The vertex buffer to draw from. |
| indexBuffer | The index buffer to draw with. |
| instances | The number of instances to draw. |
| firstIndex | The index of the first element of the index buffer to start drawing from. |
| vertexOffset | The offset added to each index to find the corresponding vertex. |
| firstInstance | The index of the first instance to draw. |