Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::GFX::CommandBuffer Class Reference

#include <CommandBuffer.h>

+ Inheritance diagram for Divide::GFX::CommandBuffer:

Public Types

using CommandList = eastl::fixed_vector< CommandBase *, COMMAND_BUFFER_INIT_SIZE, true >
 

Public Member Functions

 ~CommandBuffer ()
 
template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * add ()
 
template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * add (const T &command)
 
template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * add (T &&command)
 
void add (const CommandBuffer &other)
 
void add (Handle< CommandBuffer > other)
 
void batch ()
 
void clear ()
 
void clear (const char *name, size_t reservedCmdCount)
 
string toString () const
 Multi-line. indented list of all commands (and params for some of them)
 
std::pair< ErrorType, size_t > validate () const
 Verify that the commands in the buffer are valid and in the right order.
 
 PROPERTY_R (CommandList, commands)
 

Static Public Attributes

static constexpr U32 COMMAND_BUFFER_INIT_SIZE = 32u
 

Protected Member Functions

void clean ()
 
bool cleanInternal ()
 

Protected Attributes

bool _batched { false }
 
Str< 64 > _name
 

Additional Inherited Members

- Private Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 

Detailed Description

Definition at line 109 of file CommandBuffer.h.

Member Typedef Documentation

◆ CommandList

Definition at line 113 of file CommandBuffer.h.

Constructor & Destructor Documentation

◆ ~CommandBuffer()

Divide::GFX::CommandBuffer::~CommandBuffer ( )

Definition at line 99 of file CommandBuffer.cpp.

Member Function Documentation

◆ add() [1/5]

template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * Divide::GFX::CommandBuffer::add

Definition at line 77 of file CommandBuffer.inl.

◆ add() [2/5]

void Divide::GFX::CommandBuffer::add ( const CommandBuffer other)

Definition at line 129 of file CommandBuffer.cpp.

◆ add() [3/5]

template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * Divide::GFX::CommandBuffer::add ( const T &  command)

Definition at line 85 of file CommandBuffer.inl.

◆ add() [4/5]

void Divide::GFX::CommandBuffer::add ( Handle< CommandBuffer other)

Definition at line 142 of file CommandBuffer.cpp.

◆ add() [5/5]

template<typename T >
requires std::is_base_of_v<CommandBase, T>
T * Divide::GFX::CommandBuffer::add ( T &&  command)

Definition at line 93 of file CommandBuffer.inl.

◆ batch()

void Divide::GFX::CommandBuffer::batch ( )

Definition at line 154 of file CommandBuffer.cpp.

◆ clean()

void Divide::GFX::CommandBuffer::clean ( )
protected

Definition at line 275 of file CommandBuffer.cpp.

◆ cleanInternal()

bool Divide::GFX::CommandBuffer::cleanInternal ( )
protected

Definition at line 289 of file CommandBuffer.cpp.

◆ clear() [1/2]

void Divide::GFX::CommandBuffer::clear ( )

Definition at line 104 of file CommandBuffer.cpp.

◆ clear() [2/2]

void Divide::GFX::CommandBuffer::clear ( const char *  name,
size_t  reservedCmdCount 
)

Definition at line 119 of file CommandBuffer.cpp.

◆ PROPERTY_R()

Divide::GFX::CommandBuffer::PROPERTY_R ( CommandList  ,
commands   
)

◆ toString()

string Divide::GFX::CommandBuffer::toString ( ) const

Multi-line. indented list of all commands (and params for some of them)

Definition at line 641 of file CommandBuffer.cpp.

◆ validate()

std::pair< ErrorType, size_t > Divide::GFX::CommandBuffer::validate ( ) const

Verify that the commands in the buffer are valid and in the right order.

Definition at line 444 of file CommandBuffer.cpp.

Member Data Documentation

◆ _batched

bool Divide::GFX::CommandBuffer::_batched { false }
protected

Definition at line 147 of file CommandBuffer.h.

◆ _name

Str<64> Divide::GFX::CommandBuffer::_name
protected

Definition at line 148 of file CommandBuffer.h.

◆ COMMAND_BUFFER_INIT_SIZE

constexpr U32 Divide::GFX::CommandBuffer::COMMAND_BUFFER_INIT_SIZE = 32u
staticconstexpr

Definition at line 112 of file CommandBuffer.h.


The documentation for this class was generated from the following files: