Diligent Engine API Reference
Public Member Functions | Public Attributes | List of all members
Diligent::DrawAttribs Struct Reference

Defines the draw command attributes. More...

Public Member Functions

 DrawAttribs ()
 Initializes the structure members with default values. More...
 

Public Attributes

PRIMITIVE_TOPOLOGY Topology
 Input primitive topology, see Diligent::PRIMITIVE_TOPOLOGY.
 
VALUE_TYPE IndexType
 For an indexed draw call, type of elements in the index buffer. Allowed values: VT_UINT16 and VT_UINT32. Ignored if DrawAttribs::IsIndexed is False.
 
Bool IsIndexed
 Indicates if index buffer will be used to index input vertices.
 
Uint32 NumInstances
 Number of instances to draw. If more than one instance is specified, instanced draw call will be performed.
 
Bool IsIndirect
 Indicates if indirect draw call will be performed. If set to True, pIndirectDrawAttribs must contain valid pointer to the buffer, from which draw attributes will be read.
 
Uint32 BaseVertex
 For indexed rendering, a constant which is added to each index before accessing the vertex buffer.
 
Uint32 IndirectDrawArgsOffset
 For indirect rendering, offset from the beginning of the buffer to the location of draw command attributes. Ignored if DrawAttribs::IsIndirect is False.
 
Uint32 FirstInstanceLocation
 For instanced rendering, LOCATION (or INDEX, but NOT the byte offset) in the vertex buffer to start reading instance data from.
 
IBufferpIndirectDrawAttribs
 For indirect rendering, pointer to the buffer, from which draw attributes will be read. Ignored if DrawAttribs::IsIndirect is False.
 
Uint32 NumVertices
 For a non-indexed draw call, number of vertices to draw.
 
Uint32 NumIndices
 For an indexed draw call, number of indices to draw.
 
Uint32 StartVertexLocation
 For non-indexed rendering, LOCATION (or INDEX, but NOT the byte offset) of the first vertex in the vertex buffer to start reading vertices from.
 
Uint32 FirstIndexLocation
 For indexed rendering, LOCATION (NOT the byte offset) of the first index in the index buffer to start reading indices from.
 

Detailed Description

Defines the draw command attributes.

This structure is used by IRenderDevice::Draw()

Constructor & Destructor Documentation

Diligent::DrawAttribs::DrawAttribs ( )
inline

Initializes the structure members with default values.

Default values:

Member Default value
Topology PRIMITIVE_TOPOLOGY_UNDEFINED
NumVertices 0
IndexType VT_UNDEFINED
IsIndexed False
NumInstances 1
IsIndirect False
BaseVertex 0
IndirectDrawArgsOffset 0
StartVertexLocation 0
FirstInstanceLocation 0
pIndirectDrawAttribs nullptr