Draw indexed, instanced primitives.
public:
void DrawIndexedInstanced(
UINT IndexCountPerInstance,
UINT InstanceCount,
UINT StartIndexLocation,
INT BaseVertexLocation,
UINT StartInstanceLocation
)
IndexCountPerInstance
Type: UINT
[in] Number of indices read from the index buffer for each instance.
InstanceCount
Type: UINT
[in] Number of instances to draw.
StartIndexLocation
Type: UINT
[in] The location of the first index read by the GPU from the index buffer.
BaseVertexLocation
Type: INT
[in] A value added to each index before reading a vertex from the vertex buffer.
StartInstanceLocation
Type: UINT
[in] A value added to each index before reading per-instance data from a vertex buffer.
A Draw API submits work to the rendering pipeline.
Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Indexing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).