Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::IndirectBufferLayout Struct Reference

#include <IndirectBufferLayout.h>

Public Member Functions

 AZ_TYPE_INFO (IndirectBufferLayout, "{1D9A08FE-0C13-4AB4-9556-ECE97A27F42D}")
 
 AZ_CLASS_ALLOCATOR (IndirectBufferLayout, SystemAllocator)
 
bool IsFinalized () const
 
bool Finalize ()
 
HashValue64 GetHash (HashValue64 seed=HashValue64{ 0 }) const
 Returns the hash computed in Finalize.
 
bool AddIndirectCommand (const IndirectCommandDescriptor &command)
 
AZStd::span< const IndirectCommandDescriptorGetCommands () const
 Returns the list of indirect commands of the layout. Must be called after the layout is finalized.
 
IndirectCommandIndex FindCommandIndex (const IndirectCommandDescriptor &command) const
 
IndirectBufferLayoutType GetType () const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Detailed Description

Describes a sequence of indirect commands of an Indirect Buffer. The order in which the commands are added to the layout is preserved and defines the offset of the command.

To use the class, add commands using AddIndirectCommand, and call Finalize to complete the construction of the layout.

Member Function Documentation

◆ AddIndirectCommand()

bool AZ::RHI::IndirectBufferLayout::AddIndirectCommand ( const IndirectCommandDescriptor command)

Adds a new indirect command to the end of the layout. This must be called before the layout is finalized.

Parameters
commandThe descriptor of the command to add.
Returns
True if the command was successfully added, False otherwise.

◆ Finalize()

bool AZ::RHI::IndirectBufferLayout::Finalize ( )

Finalizes the layout for access. Must be called prior to usage or serialization. It is not permitted to mutate the layout once Finalize is called.

◆ FindCommandIndex()

IndirectCommandIndex AZ::RHI::IndirectBufferLayout::FindCommandIndex ( const IndirectCommandDescriptor command) const

Returns the position of a command. Must be called after the layout is finalized.

Parameters
commandThe descriptor of the command to find.
Returns
The position of the command in the layout. If the command is not part of the layout, a null index is returned.

◆ GetType()

IndirectBufferLayoutType AZ::RHI::IndirectBufferLayout::GetType ( ) const

Returns the type of the main command of the layout. Every layout has one main command. Must be called after the layout is finalized.


The documentation for this struct was generated from the following file: