Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::DrawIndexedIndirectAttribs Struct Reference

Defines the indexed indirect draw command attributes. More...

#include <DeviceContext.h>

Public Member Functions

constexpr DrawIndexedIndirectAttribs () noexcept
 Initializes the structure members with default values.
 
constexpr DrawIndexedIndirectAttribs (VALUE_TYPE _IndexType, IBuffer *_pAttribsBuffer, DRAW_FLAGS _Flags, Uint32 _DrawCount=DrawIndexedIndirectAttribs{}.DrawCount, Uint64 _DrawArgsOffset=DrawIndexedIndirectAttribs{}.DrawArgsOffset, Uint32 _DrawArgsStride=DrawIndexedIndirectAttribs{}.DrawArgsStride, RESOURCE_STATE_TRANSITION_MODE _AttribsBufferTransitionMode=DrawIndexedIndirectAttribs{}.AttribsBufferStateTransitionMode, IBuffer *_pCounterBuffer=DrawIndexedIndirectAttribs{}.pCounterBuffer, Uint64 _CounterOffset=DrawIndexedIndirectAttribs{}.CounterOffset, RESOURCE_STATE_TRANSITION_MODE _CounterBufferTransitionMode=DrawIndexedIndirectAttribs{}.CounterBufferStateTransitionMode) noexcept
 Initializes the structure members with user-specified values.
 

Public Attributes

VALUE_TYPE IndexType = VT_UNDEFINED
 The type of the elements in the index buffer.
 
IBufferpAttribsBuffer = 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 the draw command attributes.
 
DRAW_FLAGS Flags = DRAW_FLAG_NONE
 Additional flags, see Diligent::DRAW_FLAGS.
 
Uint32 DrawCount = 1
 The number of draw commands to execute.
 
Uint32 DrawArgsStride = 20
 When DrawCount > 1, the byte stride between successive sets of draw parameters.
 
RESOURCE_STATE_TRANSITION_MODE AttribsBufferStateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_NONE
 State transition mode for indirect draw arguments buffer.
 
IBufferpCounterBuffer = 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.
 

Detailed Description

Defines the indexed indirect draw command attributes.

This structure is used by IDeviceContext::DrawIndexedIndirect().

Member Data Documentation

◆ CounterOffset

Uint64 Diligent::DrawIndexedIndirectAttribs::CounterOffset = 0

When pCounterBuffer is not null, offset from the beginning of the counter buffer to the location of the command counter.

◆ DrawArgsStride

Uint32 Diligent::DrawIndexedIndirectAttribs::DrawArgsStride = 20

When DrawCount > 1, the byte stride between successive sets of draw parameters.

Must be a multiple of 4 and greater than or equal to 20 bytes (sizeof(Uint32) * 5).

◆ DrawCount

Uint32 Diligent::DrawIndexedIndirectAttribs::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.

◆ IndexType

VALUE_TYPE Diligent::DrawIndexedIndirectAttribs::IndexType = VT_UNDEFINED

The type of the elements in the index buffer.

Allowed values: VT_UINT16 and VT_UINT32.

◆ pAttribsBuffer

IBuffer* Diligent::DrawIndexedIndirectAttribs::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 NumIndices;
Uint32 NumInstances;
Uint32 FirstIndexLocation;
Uint32 BaseVertex;
Uint32 FirstInstanceLocation