candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
candlewick::CommandBuffer Class Reference

#include <candlewick/core/CommandBuffer.h>

Public Member Functions

 CommandBuffer (const Device &device)
 
 operator SDL_GPUCommandBuffer * () const
 Convert to SDL_GPU command buffer handle.
 
 CommandBuffer (const CommandBuffer &)=delete
 Deleted copy constructor.
 
 CommandBuffer (CommandBuffer &&other) noexcept
 Move constructor.
 
CommandBufferoperator= (const CommandBuffer &)=delete
 Deleted copy assignment operator.
 
CommandBufferoperator= (CommandBuffer &&other) noexcept
 Move assignment operator.
 
bool submit () noexcept
 
SDL_GPUFence * submitAndAcquireFence () noexcept
 
bool cancel () noexcept
 Cancel the command buffer, returning the bool value from the wrapped SDL API.
 
bool active () const noexcept
 Check if the command buffer is still active.
 
 ~CommandBuffer () noexcept
 
template<GpuCompatibleData T>
CommandBufferpushVertexUniform (Uint32 slot_index, const T &data)
 
template<GpuCompatibleData T>
CommandBufferpushFragmentUniform (Uint32 slot_index, const T &data)
 
template<GpuCompatibleData T>
CommandBufferpushVertexUniform (Uint32 slot_index, std::span< const T > data)
 
template<GpuCompatibleData T>
CommandBufferpushFragmentUniform (Uint32 slot_index, std::span< const T > data)
 
CommandBufferpushVertexUniformRaw (Uint32 slot_index, const void *data, Uint32 length)
 Push uniform data to the vertex shader.
 
CommandBufferpushFragmentUniformRaw (Uint32 slot_index, const void *data, Uint32 length)
 Push uniform data to the fragment shader.
 

Friends

void swap (CommandBuffer &lhs, CommandBuffer &rhs) noexcept
 

Constructor & Destructor Documentation

◆ CommandBuffer() [1/3]

candlewick::CommandBuffer::CommandBuffer ( const Device & device)

◆ CommandBuffer() [2/3]

candlewick::CommandBuffer::CommandBuffer ( const CommandBuffer & )
delete

Deleted copy constructor.

◆ CommandBuffer() [3/3]

candlewick::CommandBuffer::CommandBuffer ( CommandBuffer && other)
noexcept

Move constructor.

◆ ~CommandBuffer()

candlewick::CommandBuffer::~CommandBuffer ( )
inlinenoexcept

Member Function Documentation

◆ active()

bool candlewick::CommandBuffer::active ( ) const
inlinenoexcept

Check if the command buffer is still active.

For this wrapper class, it means the internal pointer is non-null.

◆ cancel()

bool candlewick::CommandBuffer::cancel ( )
noexcept

Cancel the command buffer, returning the bool value from the wrapped SDL API.

◆ operator SDL_GPUCommandBuffer *()

candlewick::CommandBuffer::operator SDL_GPUCommandBuffer * ( ) const
inline

Convert to SDL_GPU command buffer handle.

◆ operator=() [1/2]

CommandBuffer & candlewick::CommandBuffer::operator= ( CommandBuffer && other)
noexcept

Move assignment operator.

◆ operator=() [2/2]

CommandBuffer & candlewick::CommandBuffer::operator= ( const CommandBuffer & )
delete

Deleted copy assignment operator.

◆ pushFragmentUniform() [1/2]

template<GpuCompatibleData T>
CommandBuffer & candlewick::CommandBuffer::pushFragmentUniform ( Uint32 slot_index,
const T & data )
inline

◆ pushFragmentUniform() [2/2]

template<GpuCompatibleData T>
CommandBuffer & candlewick::CommandBuffer::pushFragmentUniform ( Uint32 slot_index,
std::span< const T > data )
inline

◆ pushFragmentUniformRaw()

CommandBuffer & candlewick::CommandBuffer::pushFragmentUniformRaw ( Uint32 slot_index,
const void * data,
Uint32 length )
inline

Push uniform data to the fragment shader.

◆ pushVertexUniform() [1/2]

template<GpuCompatibleData T>
CommandBuffer & candlewick::CommandBuffer::pushVertexUniform ( Uint32 slot_index,
const T & data )
inline

◆ pushVertexUniform() [2/2]

template<GpuCompatibleData T>
CommandBuffer & candlewick::CommandBuffer::pushVertexUniform ( Uint32 slot_index,
std::span< const T > data )
inline

◆ pushVertexUniformRaw()

CommandBuffer & candlewick::CommandBuffer::pushVertexUniformRaw ( Uint32 slot_index,
const void * data,
Uint32 length )
inline

Push uniform data to the vertex shader.

◆ submit()

bool candlewick::CommandBuffer::submit ( )
inlinenoexcept

◆ submitAndAcquireFence()

SDL_GPUFence * candlewick::CommandBuffer::submitAndAcquireFence ( )
inlinenoexcept

Friends And Related Symbol Documentation

◆ swap

void swap ( CommandBuffer & lhs,
CommandBuffer & rhs )
friend

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