Skip to content

LiteFX::Rendering::IBuffer

Base interface for buffer objects.

Synopsis

Declared in <litefx/rendering_api.hpp>

class [[dllimport, dllexport]] IBuffer
    : public virtual IDeviceMemory
    , public virtual IMappable
    , public virtual IStateResource
    , public SharedObject

Base Classes

NameDescription
IDeviceMemoryDescribes a chunk of device memory.
IMappableAllows for data to be mapped into the object.
IStateResourceThe interface for a state resource.
SharedObjectBase class for an object that can be shared.

Types

NameDescription
PrepareMoveEventArgs Stores a reference to a barrier that can be used to synchronize accesses to the resource with a move operation.
ResourceMovingEventArgs Stores the fence and the command queue to wait on for the fence before a moved resource can be used.

Type Aliases

Name
_Esft_type

Member Functions

NameDescription
~IBuffer [destructor] [virtual]Destructor
alignedElementSize [virtual]Returns the actual size of the element in device memory.
elementAlignment [virtual]Returns the alignment of a single element.
elementSize [virtual]Returns the size of a single element within the buffer. If there is only one element, this is equal to size.
elements [virtual]Gets the number of sub-resources inside the memory chunk.
map map overloads
name [virtual]Returns the name of the resource.
read [virtual]Writes a span of memory in data into the internal memory of this object, starting at offset.
shared_from_this Returns a shared pointer to the current object instance.
size [virtual]Gets the size (in bytes) of the aligned memory chunk.
type [virtual]Returns the type of the buffer.
usage [virtual]Returns the usage flags for the resource.
virtualAddress [virtual]Gets the address of the resource in GPU memory.
volatileMove [virtual]Returns true, if the contents of the resource should not be copied during a move.
weak_from_this Returns a weak pointer to the current object instance.
writable [virtual]Returns true, if the resource can be bound to a read/write descriptor.
write [virtual]Writes a span of memory in data into the internal memory of this object, starting at offset.

Data Members

NameDescription
moved An event that gets invoked, after the resource has been moved to a different location, but before the old resource gets destroyed.
moving An event that gets invoked before a resource is copied during a move.
prepareMove An event that gets invoked to prepare a resource for a move operation.

Protected Types

NameDescription
Allocator An allocator used to allocate the shared object.

Protected Member Functions

NameDescription
IBuffer [constructor]Constructors
operator= Assignment operators

Protected Static Member Functions

NameDescription
create Generic factory method used to create instances of the shared object.

Derived Classes

NameDescription
IDirectX12Buffer Represents the base interface for a DirectX 12 buffer implementation.
IIndexBuffer The interface for an index buffer.
IVertexBuffer The interface for a vertex buffer.
IVulkanBuffer Represents the base interface for a Vulkan buffer implementation.