Defines the indirect draw command attributes. More...
#include <DeviceContext.h>
Public Member Functions | |
constexpr | DrawIndirectAttribs () noexcept |
Initializes the structure members with default values. | |
constexpr | DrawIndirectAttribs (IBuffer *_pAttribsBuffer, DRAW_FLAGS _Flags, Uint32 _DrawCount=DrawIndirectAttribs{}.DrawCount, Uint64 _DrawArgsOffset=DrawIndirectAttribs{}.DrawArgsOffset, Uint32 _DrawArgsStride=DrawIndirectAttribs{}.DrawArgsStride, RESOURCE_STATE_TRANSITION_MODE _AttribsBufferTransitionMode=DrawIndirectAttribs{}.AttribsBufferStateTransitionMode, IBuffer *_pCounterBuffer=DrawIndirectAttribs{}.pCounterBuffer, Uint64 _CounterOffset=DrawIndirectAttribs{}.CounterOffset, RESOURCE_STATE_TRANSITION_MODE _CounterBufferTransitionMode=DrawIndirectAttribs{}.CounterBufferStateTransitionMode) noexcept |
Initializes the structure members with user-specified values. | |
Public Attributes | |
IBuffer * | pAttribsBuffer = nullptr |
A pointer to the buffer, from which indirect draw attributes will be read. | |
Uint64 | DrawArgsOffset = 0 |
Offset from the beginning of the buffer to the location of draw command attributes. | |
DRAW_FLAGS | Flags = DRAW_FLAG_NONE |
Additional flags, see Diligent::DRAW_FLAGS. | |
Uint32 | DrawCount = 1 |
Uint32 | DrawArgsStride = 16 |
RESOURCE_STATE_TRANSITION_MODE | AttribsBufferStateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_NONE |
State transition mode for indirect draw arguments buffer. | |
IBuffer * | pCounterBuffer = nullptr |
A pointer to the optional buffer, from which Uint32 value with the draw count will be read. | |
Uint64 | CounterOffset = 0 |
RESOURCE_STATE_TRANSITION_MODE | CounterBufferStateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_NONE |
When counter buffer is not null, state transition mode for the count buffer. | |
Defines the indirect draw command attributes.
This structure is used by IDeviceContext::DrawIndirect().
Uint64 Diligent::DrawIndirectAttribs::CounterOffset = 0 |
When pCounterBuffer is not null, an offset from the beginning of the buffer to the location of the command counter.
Uint32 Diligent::DrawIndirectAttribs::DrawArgsStride = 16 |
When DrawCount > 1
, the byte stride between successive sets of draw parameters. Must be a multiple of 4 and greater than or equal to 16 bytes (sizeof(Uint32) * 4
).
Uint32 Diligent::DrawIndirectAttribs::DrawCount = 1 |
The number of draw commands to execute. When the pCounterBuffer is not null, this member defines the maximum number of commands that will be executed. Must be less than DrawCommandProperties::MaxDrawIndirectCount.
IBuffer* Diligent::DrawIndirectAttribs::pAttribsBuffer = nullptr |
A pointer to the buffer, from which indirect draw attributes will be read.
The buffer must contain the following arguments at the specified offset:
Uint32 NumVertices; Uint32 NumInstances; Uint32 StartVertexLocation; Uint32 FirstInstanceLocation;