CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUBindlessBuffer Class Reference

A GPU bindless buffer. More...

#include <CeresEngine/RenderAPI/GPUBufferObject.hpp>

Inheritance diagram for CeresEngine::GPUBindlessBuffer:
CeresEngine::GPUBufferObject

Public Member Functions

 GPUBindlessBuffer ()=default
 Creates a new empty BindlessBuffer.
 
 GPUBindlessBuffer (GPUBufferPtr buffer, GPUBufferSize offset=0, GPUBufferSize length=GPUBuffer::whole)
 Creates a new BindlessBuffer from an existing GPU buffer.
 
 GPUBindlessBuffer (GPUBuffer &buffer, const GPUBufferSize offset=0, const GPUBufferSize length=GPUBuffer::whole)
 
 GPUBindlessBuffer (GPUDevice &device, GPUBufferSize size, const GPUMemoryProperties &memoryProperty=GPUMemoryProperty::DeviceLocal, String name="")
 Creates a new BindlessBuffer.
 
 GPUBindlessBuffer (std::nullptr_t)
 Creates a new empty BindlessBuffer.
 
 GPUBindlessBuffer (const GPUBindlessBuffer &)=default
 Creates a new BindlessBuffer by copying another.
 
GPUBindlessBufferoperator= (const GPUBindlessBuffer &)=default
 Assigns the BindlessBuffer by copying another.
 
 GPUBindlessBuffer (GPUBindlessBuffer &&)=default
 Creates a new BindlessBuffer by moving another.
 
GPUBindlessBufferoperator= (GPUBindlessBuffer &&)=default
 Assigns a BindlessBuffer by moving another.
 
 ~GPUBindlessBuffer ()
 Destroys the BindlessBuffer.
 
- Public Member Functions inherited from CeresEngine::GPUBufferObject
 GPUBufferObject ()=default
 Creates a new empty BufferObject.
 
 GPUBufferObject (GPUBufferPtr buffer, GPUBufferSize offset=0, GPUBufferSize length=GPUBuffer::whole)
 Creates a new BufferObject from an existing GPU buffer.
 
 GPUBufferObject (GPUBuffer &buffer, const GPUBufferSize offset=0, const GPUBufferSize length=GPUBuffer::whole)
 
 GPUBufferObject (GPUDevice &device, const GPUBufferDescriptor &descriptor)
 Creates a new BufferObject.
 
 GPUBufferObject (std::nullptr_t)
 Creates a new empty BufferObject.
 
GPUBufferObjectoperator= (std::nullptr_t)
 Assigns the BufferObject an empty value.
 
 GPUBufferObject (const GPUBufferObject &)=default
 Creates a new BufferObject by copying another.
 
GPUBufferObjectoperator= (const GPUBufferObject &)=default
 Assigns the BufferObject by copying another.
 
 GPUBufferObject (GPUBufferObject &&)=default
 Creates a new BufferObject by moving another.
 
GPUBufferObjectoperator= (GPUBufferObject &&)=default
 Assigns a BufferObject by moving another.
 
 ~GPUBufferObject ()
 Destroys the BufferObject.
 
void flush (GPUBufferSize offset=0, GPUBufferSize size=GPUBuffer::whole)
 Flushes the cached memory data starting at offset with size bytes.
 
void invalidate (GPUBufferSize offset=0, GPUBufferSize size=GPUBuffer::whole)
 Invalidates the cached memory data starting at offset with size bytes.
 
GPUBufferPtr getBuffer () const noexcept
 
GPUBufferSize getOffset () const noexcept
 
GPUBufferSize getLength () const noexcept
 
 operator bool () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from CeresEngine::GPUBufferObject
GPUBufferPtr mBuffer = nullptr
 A pointer to the GPU allocated buffer.
 
GPUBufferSize mOffset = 0
 The offset to the beginning of the buffer object data.
 
GPUBufferSize mLength = GPUBuffer::whole
 The length of the buffer data.
 

Detailed Description

A GPU bindless buffer.

It is a special buffer that is usable both as a uniform buffer and as a storage buffer.

Constructor & Destructor Documentation

◆ GPUBindlessBuffer() [1/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( )
default

Creates a new empty BindlessBuffer.

◆ GPUBindlessBuffer() [2/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( GPUBufferPtr  buffer,
GPUBufferSize  offset = 0,
GPUBufferSize  length = GPUBuffer::whole 
)
explicit

Creates a new BindlessBuffer from an existing GPU buffer.

Parameters
bufferThe existing GPU buffer
offsetThe offset to the beginning of the bindless buffer

◆ GPUBindlessBuffer() [3/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( GPUBuffer buffer,
const GPUBufferSize  offset = 0,
const GPUBufferSize  length = GPUBuffer::whole 
)
inlineexplicit

◆ GPUBindlessBuffer() [4/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( GPUDevice device,
GPUBufferSize  size,
const GPUMemoryProperties memoryProperty = GPUMemoryProperty::DeviceLocal,
String  name = "" 
)
explicit

Creates a new BindlessBuffer.

Parameters
deviceThe device to create the buffer from
sizeThe buffer size in bytes
memoryPropertyThe memory property flags
nameThe buffer name (used for debugging only).

◆ GPUBindlessBuffer() [5/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( std::nullptr_t  )
inline

Creates a new empty BindlessBuffer.

◆ GPUBindlessBuffer() [6/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( const GPUBindlessBuffer )
default

Creates a new BindlessBuffer by copying another.

The contents of the buffer are not copied.

◆ GPUBindlessBuffer() [7/7]

CeresEngine::GPUBindlessBuffer::GPUBindlessBuffer ( GPUBindlessBuffer &&  )
default

Creates a new BindlessBuffer by moving another.

◆ ~GPUBindlessBuffer()

CeresEngine::GPUBindlessBuffer::~GPUBindlessBuffer ( )

Destroys the BindlessBuffer.

Member Function Documentation

◆ operator=() [1/2]

GPUBindlessBuffer & CeresEngine::GPUBindlessBuffer::operator= ( const GPUBindlessBuffer )
default

Assigns the BindlessBuffer by copying another.

The contents of the buffer are not copied.

◆ operator=() [2/2]

GPUBindlessBuffer & CeresEngine::GPUBindlessBuffer::operator= ( GPUBindlessBuffer &&  )
default

Assigns a BindlessBuffer by moving another.


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