ID3D11DeviceContext::DrawIndexedInstanced method

Draw indexed, instanced primitives.

Syntax


void DrawIndexedInstanced(
  [in] UINT IndexCountPerInstance,
  [in] UINT InstanceCount,
  [in] UINT StartIndexLocation,
  [in] INT  BaseVertexLocation,
  [in] UINT StartInstanceLocation
);

Parameters

IndexCountPerInstance [in]

Type: UINT

Number of indices read from the index buffer for each instance.

InstanceCount [in]

Type: UINT

Number of instances to draw.

StartIndexLocation [in]

Type: UINT

The location of the first index read by the GPU from the index buffer.

BaseVertexLocation [in]

Type: INT

A value added to each index before reading a vertex from the vertex buffer.

StartInstanceLocation [in]

Type: UINT

A value added to each index before reading per-instance data from a vertex buffer.

Return value

Returns nothing.

Remarks

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. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11DeviceContext

 

 

Show: