End
Map
Expand Minimize
This topic has not yet been rated - Rate this topic

ID3D11DeviceContext::DrawInstanced method

Draw non-indexed, instanced primitives.

Syntax


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

Parameters

VertexCountPerInstance [in]

Type: UINT

Number of vertices to draw.

InstanceCount [in]

Type: UINT

Number of instances to draw.

StartVertexLocation [in]

Type: UINT

Index of the first vertex.

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.

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).

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11DeviceContext

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.