Syntax
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
Type: void None.Remarks
A draw API submits work to the rendering pipeline. Instancing might 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 typically comes from a vertex buffer that is bound to the pipeline. But, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic (SV_InstanceID).Examples
The D3D12HelloTriangle sample uses ID3D12GraphicsCommandList::DrawInstanced as follows:Requirements
Header: d3d12_xs.h or d3d12_x.hLibrary: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family
