|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/RenderAPI/GPUBuffer.hpp>
Public Member Functions | |
| GPUBuffer (const GPUBuffer &)=delete | |
| Deleted copy constructor. | |
| GPUBuffer & | operator= (const GPUBuffer &)=delete |
| GPUBuffer (GPUBuffer &&)=delete | |
| Deleted move constructor. | |
| GPUBuffer & | operator= (GPUBuffer &&)=delete |
| Async< ByteBuffer > | read (GPUBufferSize offset=0, GPUBufferSize size=whole) |
| Performs an asynchronous read operation on the buffer. | |
| Async< ByteBuffer > | read (GPUCommandBuffer &commandBuffer, GPUBufferSize offset=0, GPUBufferSize size=whole) |
| Performs an asynchronous read operation on the buffer in an specific command buffer. | |
| Async | write (ByteBuffer &&rawData, GPUBufferSize offset=0, GPUBufferSize size=whole) |
| Performs an asynchronous write operation on the buffer. | |
| Async | write (GPUCommandBuffer &commandBuffer, ByteBuffer &&rawData, GPUBufferSize offset=0, GPUBufferSize size=whole) |
| Performs an asynchronous write operation on the buffer in an specific command buffer. | |
| virtual GPUBufferData | map ()=0 |
| Maps the buffer into the computers memory. | |
| virtual void | unmap ()=0 |
| Unmaps the previously mapped GPU memory buffer. | |
| virtual GPUBufferSize | getSize () const =0 |
| virtual void | flush (GPUBufferSize offset=0, GPUBufferSize size=whole)=0 |
Flushes the cached memory data starting at offset with size bytes. | |
| virtual void | invalidate (GPUBufferSize offset=0, GPUBufferSize size=whole)=0 |
Invalidates the cached memory data starting at offset with size bytes. | |
| template<typename Block > | |
| void | data (Block &&block) |
Executes block with a pointer that gives direct access to the buffer data. | |
| TDeviceObject (GPUDevice &device, const Descriptor &descriptor) | |
| Inherited constructors. | |
| TDeviceObject (const TDeviceObject &)=delete | |
| Inherited constructors. | |
| TDeviceObject (TDeviceObject &&)=delete | |
| Inherited constructors. | |
Public Member Functions inherited from CeresEngine::TDeviceObject< GPUBufferDescriptor, GPUResource > | |
| TDeviceObject (GPUDevice &device, const Descriptor &descriptor) | |
| Initializes a new RenderAPI device object instance. | |
| TDeviceObject (const TDeviceObject &)=delete | |
| TDeviceObject (TDeviceObject &&)=delete | |
| ~TDeviceObject () override=default | |
| TDeviceObject & | operator= (const TDeviceObject &)=delete |
| TDeviceObject & | operator= (TDeviceObject &&)=delete |
Public Member Functions inherited from CeresEngine::GPUResource | |
| GPUDeviceObject (GPUDevice &device) | |
Public Member Functions inherited from CeresEngine::GPUDeviceObject | |
| GPUDeviceObject (GPUDevice &device) | |
| ~GPUDeviceObject () override | |
Public Member Functions inherited from CeresEngine::GPUObject | |
| GPUObject ()=default | |
| virtual | ~GPUObject ()=default |
| GPUObject (const GPUObject &)=delete | |
| GPUObject & | operator= (const GPUObject &)=delete |
| GPUObject (GPUObject &&)=delete | |
| GPUObject & | operator= (GPUObject &&)=delete |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Releases the object by decrementing it's reference count by one. | |
Static Public Attributes | |
| static const constexpr GPUBufferSize | whole = ~0UL |
| A constant the represents the whole buffer length. | |
Additional Inherited Members | |
Public Types inherited from CeresEngine::TDeviceObject< GPUBufferDescriptor, GPUResource > | |
| using | Descriptor = GPUBufferDescriptor |
| An type-alias to the descriptor struct type. | |
Public Attributes inherited from CeresEngine::TDeviceObject< GPUBufferDescriptor, GPUResource > | |
| const Descriptor & | descriptor |
| A structure that describes the object and it's properties. | |
Public Attributes inherited from CeresEngine::GPUDeviceObject | |
| GPUDevice & | device |
| The owning device this object was created from. | |
Protected Member Functions inherited from CeresEngine::GPUObject | |
| virtual void | destroy () noexcept |
| A internal method called by the system when the object reference count reaches zero. | |
|
delete |
Deleted move constructor.
Executes block with a pointer that gives direct access to the buffer data.
| block | The block to be executed with a pointer to the GPU buffer. |
|
pure virtual |
Flushes the cached memory data starting at offset with size bytes.
| offset | The starting offset to be flushed |
| size | The amount of bytes to be flushed |
Implemented in CeresEngine::MTBuffer, CeresEngine::MKBuffer, CeresEngine::NLBuffer, CeresEngine::GLBuffer, CeresEngine::VKBuffer, and CeresEngine::WGBuffer.
|
pure virtual |
Implemented in CeresEngine::MTBuffer, CeresEngine::MKBuffer, CeresEngine::NLBuffer, CeresEngine::GLBuffer, CeresEngine::VKBuffer, and CeresEngine::WGBuffer.
|
pure virtual |
Invalidates the cached memory data starting at offset with size bytes.
| offset | The starting offset to be flushed |
| size | The amount of bytes to be flushed |
Implemented in CeresEngine::MTBuffer, CeresEngine::MKBuffer, CeresEngine::NLBuffer, CeresEngine::GLBuffer, CeresEngine::VKBuffer, and CeresEngine::WGBuffer.
|
pure virtual |
Maps the buffer into the computers memory.
Implemented in CeresEngine::MTBuffer, CeresEngine::MKBuffer, CeresEngine::NLBuffer, CeresEngine::GLBuffer, CeresEngine::VKBuffer, and CeresEngine::WGBuffer.
| Async< ByteBuffer > CeresEngine::GPUBuffer::read | ( | GPUBufferSize | offset = 0, |
| GPUBufferSize | size = whole |
||
| ) |
Performs an asynchronous read operation on the buffer.
| offset | The offset into the buffer to start reading the contents at. |
| size | The amount of bytes to be read from the buffer. |
| Async< ByteBuffer > CeresEngine::GPUBuffer::read | ( | GPUCommandBuffer & | commandBuffer, |
| GPUBufferSize | offset = 0, |
||
| GPUBufferSize | size = whole |
||
| ) |
Performs an asynchronous read operation on the buffer in an specific command buffer.
| commandBuffer | The command buffer to execute the copy commands on. |
| offset | The offset into the buffer to start reading the contents at. |
| size | The amount of bytes to be read from the buffer. |
|
delete |
Inherited constructors.
|
inlineexplicit |
Inherited constructors.
|
delete |
Inherited constructors.
Unmaps the previously mapped GPU memory buffer.
Implemented in CeresEngine::MTBuffer, CeresEngine::MKBuffer, CeresEngine::NLBuffer, CeresEngine::GLBuffer, CeresEngine::VKBuffer, and CeresEngine::WGBuffer.
| Async CeresEngine::GPUBuffer::write | ( | ByteBuffer && | rawData, |
| GPUBufferSize | offset = 0, |
||
| GPUBufferSize | size = whole |
||
| ) |
Performs an asynchronous write operation on the buffer.
| rawData | A raw byte buffer to be copied into the device buffer. |
| offset | The offset into the buffer to start writing the contents at. |
| size | The amount of bytes to be written to the buffer. |
| Async CeresEngine::GPUBuffer::write | ( | GPUCommandBuffer & | commandBuffer, |
| ByteBuffer && | rawData, | ||
| GPUBufferSize | offset = 0, |
||
| GPUBufferSize | size = whole |
||
| ) |
Performs an asynchronous write operation on the buffer in an specific command buffer.
| commandBuffer | The command buffer to execute the copy commands on. |
| rawData | A raw byte buffer to be copied into the device buffer. |
| offset | The offset into the buffer to start writing the contents at. |
| size | The amount of bytes to be written to the buffer. |
|
inlinestaticconstexpr |
A constant the represents the whole buffer length.