Home -> IRenderableNode -> SetIndirectDraw

Description

The SetIndirectDraw method configures indirect drawing for this object, allowing draw settings to be sourced from an IDataArray rather than set directly by application code. The source array must contain either IndirectDrawParams entries or IndexedIndirectDrawParams entries, depending on whether an index attribute is bound.

ImportantImportant

Indirect drawing requires the IndirectDraw feature to be supported and enabled on the renderer. Counted multi-draw variants may require additional renderer support.

Usage

SuccessToken SetIndirectDraw(size_t drawCount, IDataArray* sourceDataArray, size_t arrayOffsetInBytes = 0, size_t arrayStrideInBytes = 0);
SuccessToken SetIndirectDraw(size_t maxDrawCount, IDataArray* drawCountSourceCounter, IDataArray* sourceDataArray, size_t arrayOffsetInBytes = 0, size_t arrayStrideInBytes = 0);
SuccessToken SetIndirectDraw(size_t maxDrawCount, IDataArray* drawCountSourceDataArray, size_t drawCountArrayOffsetInBytes, IDataArray* sourceDataArray, size_t arrayOffsetInBytes = 0, size_t arrayStrideInBytes = 0);

Argument list

drawCount [size_t]
The fixed number of indirect draw entries to execute.
maxDrawCount [size_t]
The maximum number of indirect draw entries that may be executed when the actual count is read from a buffer.
drawCountSourceCounter [IDataArray*]
The data array whose attached counter supplies the actual draw count.
drawCountSourceDataArray [IDataArray*]
The data array containing the actual draw count value.
drawCountArrayOffsetInBytes [size_t]
The byte offset of the draw count value in drawCountSourceDataArray.
sourceDataArray [IDataArray*]
The data array containing the indirect draw parameter entries.
arrayOffsetInBytes [size_t]
The byte offset of the first draw parameter entry in sourceDataArray.
arrayStrideInBytes [size_t]
The byte stride between draw parameter entries. Use 0 to select the renderer's default stride for the active draw mode.

Return value

[SuccessToken]
True if the operation succeeded, false otherwise. An assertion will be raised in debug builds if the result is not tested.

See also