LiteFX  0.1.1.2021
Computer Graphics Engine
LiteFX::Rendering::IConstantBuffer< TBufferInterface, TCommandBuffer, TDescriptorLayout > Class Template Reference

Describes a constant buffer. More...

#include <rendering.hpp>

Inherits LiteFX::Rendering::ITransferableBuffer< TBufferInterface, TCommandBuffer >, and LiteFX::Rendering::IDescriptor< TDescriptorLayout >.

Public Member Functions

virtual ~IConstantBuffer () noexcept=default
 
- Public Member Functions inherited from LiteFX::Rendering::ITransferableBuffer< TBufferInterface, TCommandBuffer >
virtual ~ITransferableBuffer () noexcept=default
 
- Public Member Functions inherited from LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >
virtual ~ITransferable () noexcept=default
 
virtual void transferFrom (const TCommandBuffer &commandBuffer, const TBufferInterface &source, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0
 Transfers data from the source buffer into the objects local memory. More...
 
virtual void transferTo (const TCommandBuffer &commandBuffer, const TBufferInterface &target, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0
 Transfers data from the objects local memory into the target buffer. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IBuffer
virtual ~IBuffer () noexcept=default
 
virtual const BufferType & type () const noexcept=0
 Returns the type of the buffer. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IDeviceMemory
virtual ~IDeviceMemory () noexcept=default
 
virtual const UInt32elements () const noexcept=0
 Gets the number of array elements inside the memory chunk. More...
 
virtual size_t size () const noexcept=0
 Gets the size (in bytes) of the aligned memory chunk. More...
 
virtual size_t elementSize () const noexcept=0
 Returns the size of a single element within the buffer. If there is only one element, this is equal to size. More...
 
virtual size_t elementAlignment () const noexcept=0
 Returns the alignment of a single element. More...
 
virtual size_t alignedElementSize () const noexcept=0
 Returns the actual size of the element in device memory. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IMappable
virtual ~IMappable () noexcept=default
 
virtual void map (const void *const data, const size_t &size, const UInt32 &element=0)=0
 Maps the memory at data to the internal memory of this object. More...
 
virtual void map (Span< const void *const > data, const size_t &elementSize, const UInt32 &firstElement=0)=0
 Maps the memory blocks within data to the internal memory of an array. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IDescriptor< TDescriptorLayout >
virtual ~IDescriptor () noexcept=default
 
virtual const TDescriptorLayout & layout () const noexcept=0
 Gets the layout of the descriptor. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IBindable
virtual ~IBindable () noexcept=default
 
virtual const UInt32binding () const noexcept=0
 Gets the binding point, this object will be bound to. More...
 

Additional Inherited Members

- Public Types inherited from LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >
using command_buffer_type = TCommandBuffer
 
using buffer_type = TBufferInterface
 
- Public Types inherited from LiteFX::Rendering::IDescriptor< TDescriptorLayout >
using descriptor_layout_type = TDescriptorLayout
 

Detailed Description

template<typename TBufferInterface, typename TCommandBuffer, typename TDescriptorLayout>
class LiteFX::Rendering::IConstantBuffer< TBufferInterface, TCommandBuffer, TDescriptorLayout >

Describes a constant buffer.

Constant buffers are used to represent both: UBOs/CBVs and SSBOs/UAVs. The actual type of buffer is described by the descriptors IBufferLayout type.

Template Parameters
TBufferInterfaceThe base buffe interface. Must inherit from ITransferableBuffer.
TCommandBufferThe type of the command buffer. Must implement from ICommandBuffer.
TDescriptorLayoutThe type of the descriptor layout. Must inherit from IDescriptorLayout.

Constructor & Destructor Documentation

◆ ~IConstantBuffer()

template<typename TBufferInterface , typename TCommandBuffer , typename TDescriptorLayout >
virtual LiteFX::Rendering::IConstantBuffer< TBufferInterface, TCommandBuffer, TDescriptorLayout >::~IConstantBuffer ( )
virtualdefaultnoexcept