LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::IMappable Class Referenceabstract

Allows for data to be mapped into the object. More...

#include <rendering_api.hpp>

Inherited by LiteFX::Rendering::IBuffer [virtual].

Public Member Functions

virtual ~IMappable () noexcept=default
 
virtual void map (const void *const data, size_t size, UInt32 element=0)=0
 Maps the memory at data to the internal memory of this object.
 
virtual void map (Span< const void *const > data, size_t elementSize, UInt32 firstElement=0)=0
 Maps the memory blocks within data to the internal memory of an array.
 
virtual void map (void *data, size_t size, UInt32 element=0, bool write=true)=0
 Maps the memory at data to the internal memory of this object.
 
virtual void map (Span< void * > data, size_t elementSize, UInt32 firstElement=0, bool write=true)=0
 Maps the memory blocks within data to the internal memory of an array.
 

Protected Member Functions

 IMappable () noexcept=default
 
 IMappable (IMappable &&) noexcept=default
 
 IMappable (const IMappable &)=default
 
IMappableoperator= (IMappable &&) noexcept=default
 
IMappableoperator= (const IMappable &)=default
 

Detailed Description

Allows for data to be mapped into the object.

Constructor & Destructor Documentation

◆ IMappable() [1/3]

LiteFX::Rendering::IMappable::IMappable ( )
protecteddefaultnoexcept

◆ IMappable() [2/3]

LiteFX::Rendering::IMappable::IMappable ( IMappable && )
protecteddefaultnoexcept

◆ IMappable() [3/3]

LiteFX::Rendering::IMappable::IMappable ( const IMappable & )
protecteddefault

◆ ~IMappable()

virtual LiteFX::Rendering::IMappable::~IMappable ( )
virtualdefaultnoexcept

Member Function Documentation

◆ map() [1/4]

virtual void LiteFX::Rendering::IMappable::map ( const void *const data,
size_t size,
UInt32 element = 0 )
pure virtual

Maps the memory at data to the internal memory of this object.

Parameters
dataThe address that marks the beginning of the data to map.
sizeThe number of bytes to map.
elementThe array element to map the data to.

Implemented in LiteFX::Rendering::Backends::DirectX12Buffer, and LiteFX::Rendering::Backends::VulkanBuffer.

◆ map() [2/4]

virtual void LiteFX::Rendering::IMappable::map ( Span< const void *const > data,
size_t elementSize,
UInt32 firstElement = 0 )
pure virtual

Maps the memory blocks within data to the internal memory of an array.

Parameters
dataThe data blocks to map.
sizeThe size of each data block within data .
firstElementThe first element of the array to map.

Implemented in LiteFX::Rendering::Backends::DirectX12Buffer, and LiteFX::Rendering::Backends::VulkanBuffer.

◆ map() [3/4]

virtual void LiteFX::Rendering::IMappable::map ( Span< void * > data,
size_t elementSize,
UInt32 firstElement = 0,
bool write = true )
pure virtual

Maps the memory blocks within data to the internal memory of an array.

Parameters
dataThe data blocks to map.
sizeThe size of each data block within data .
firstElementThe first element of the array to map.
writeIf true, data is copied into the internal memory. If false the internal memory is copied into data .

Implemented in LiteFX::Rendering::Backends::DirectX12Buffer, and LiteFX::Rendering::Backends::VulkanBuffer.

◆ map() [4/4]

virtual void LiteFX::Rendering::IMappable::map ( void * data,
size_t size,
UInt32 element = 0,
bool write = true )
pure virtual

Maps the memory at data to the internal memory of this object.

Parameters
dataThe address that marks the beginning of the data to map.
sizeThe number of bytes to map.
elementThe array element to map the data to.
writeIf true, data is copied into the internal memory. If false the internal memory is copied into data .

Implemented in LiteFX::Rendering::Backends::DirectX12Buffer, and LiteFX::Rendering::Backends::VulkanBuffer.

◆ operator=() [1/2]

IMappable & LiteFX::Rendering::IMappable::operator= ( const IMappable & )
protecteddefault

◆ operator=() [2/2]

IMappable & LiteFX::Rendering::IMappable::operator= ( IMappable && )
protecteddefaultnoexcept