ID3D11DeviceContext::DrawInstancedIndirect Method

Draw instanced, GPU-generated primitives.

Syntax

public:
void DrawInstancedIndirect(
         ID3D11Buffer *pBufferForArgs,
         UINT AlignedByteOffsetForArgs
)  

Parameters

pBufferForArgs
Type: ID3D11Buffer *

[in] A pointer to an ID3D11Buffer, which is a buffer containing the GPU generated primitives.

The layout of the indirect buffer must adhere to the layout of the D3D11_DRAW_INSTANCED_INDIRECT_ARGS structure.

Explicit synchronization on the buffer is required before passing it as a parameter, refer to Multi-Draw calls.

AlignedByteOffsetForArgs
Type: UINT 

[in] Offset in pBufferForArgs to the start of the GPU generated primitives.

Return value

None.

Remarks

When an application creates a buffer that is associated with the ID3D11Buffer interface that pBufferForArgs points to, the application must set the D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS flag in the MiscFlags member of the D3D11_BUFFER_DESC structure that describes the buffer. To create the buffer, the application calls the ID3D11Device::CreateBuffer method and in this call passes a pointer to D3D11_BUFFER_DESC in the pDesc parameter.

See the synchronization requirements for this method.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext

ID3D11DeviceContext Members