Syntax
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
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. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.Examples
The D3D12Bundles sample uses ID3D12GraphicsCommandList::DrawIndexedInstanced 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
