ID3D10Device::DrawInstanced method (d3d10.h)

Draw non-indexed, instanced primitives.

Syntax

void DrawInstanced(
  [in] UINT VertexCountPerInstance,
  [in] UINT InstanceCount,
  [in] UINT StartVertexLocation,
  [in] UINT StartInstanceLocation
);

Parameters

[in] VertexCountPerInstance

Type: UINT

Number of vertices to draw.

[in] InstanceCount

Type: UINT

Number of instances to draw.

[in] StartVertexLocation

Type: UINT

Index of the first vertex.

[in] StartInstanceLocation

Type: UINT

Index of the first instance.

Return value

None

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. For an example of instancing, see the Instancing10 Sample.

The vertex data for an instanced draw call normally comes from a vertex buffer that is bound to the pipeline. However, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic (SV_InstanceID).

Requirements

Requirement Value
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See also

ID3D10Device Interface