|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
Backend-agnostic GPU buffer: vertex, index, constant, or resource view target. More...
#include <BufferBase.hpp>
Public Member Functions | |
| const void * | GetCPUShadowCopy () const |
| size_t | GetCPUShadowCopySize () const |
| virtual void * | GetData ()=0 |
| size_t | GetSize () |
| int | GetSlot () const |
| BufferType | GetType () |
| uint32_t | GetVertexFormat () const |
| Registered custom vertex layout of this buffer; 0 means the engine default Vertex. | |
| virtual bool | Map ()=0 |
| Maps the buffer for CPU writes; returns false if already mapped or unmappable. | |
| void | SetSlot (int slot) |
| void | SetVertexFormat (uint32_t handle) |
| Tags the buffer with a VertexFormatRegistry handle so backends pick the matching pipeline. | |
| void | StoreCPUShadowCopy (const void *data, size_t size) |
| Copies up to 128 bytes into the inline shadow-copy storage, clamping oversized input. | |
| virtual void | Unmap ()=0 |
| virtual void | Update ()=0 |
| virtual void | Update (void *data, size_t size)=0 |
| Overwrites the buffer contents with new data of a given size. | |
| Public Member Functions inherited from Sleak::ResourceBase | |
| virtual | ~ResourceBase ()=default |
| virtual void | Cleanup ()=0 |
| virtual bool | Initialize (void *Data)=0 |
| Allocates backend resources from backend-specific creation parameters. | |
Protected Attributes | |
| bool | bIsMapped = false |
| void * | Data = nullptr |
| const void * | m_cpuShadowCopy = nullptr |
| size_t | m_cpuShadowCopySize = 0 |
| char | m_cpuShadowStorage [128] = {} |
| uint32_t | m_vertexFormat = 0 |
| size_t | Size = 0 |
| int | Slot = 0 |
| BufferType | Type |
| Protected Attributes inherited from Sleak::ResourceBase | |
| bool | bIsInitialized |
| std::string | Name |
Backend-agnostic GPU buffer: vertex, index, constant, or resource view target.
Definition at line 16 of file BufferBase.hpp.
|
inline |
Definition at line 46 of file BufferBase.hpp.
|
inline |
Definition at line 47 of file BufferBase.hpp.
|
pure virtual |
|
inline |
Definition at line 27 of file BufferBase.hpp.
|
inline |
Definition at line 33 of file BufferBase.hpp.
|
inline |
Definition at line 31 of file BufferBase.hpp.
|
inline |
Registered custom vertex layout of this buffer; 0 means the engine default Vertex.
Definition at line 41 of file BufferBase.hpp.
|
pure virtual |
Maps the buffer for CPU writes; returns false if already mapped or unmappable.
Implemented in Sleak::RenderEngine::DirectX11Buffer, Sleak::RenderEngine::DirectX12Buffer, Sleak::RenderEngine::OpenGLBuffer, and Sleak::RenderEngine::VulkanBuffer.
|
inline |
Definition at line 35 of file BufferBase.hpp.
|
inline |
Tags the buffer with a VertexFormatRegistry handle so backends pick the matching pipeline.
Definition at line 43 of file BufferBase.hpp.
|
inline |
Copies up to 128 bytes into the inline shadow-copy storage, clamping oversized input.
Definition at line 49 of file BufferBase.hpp.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Overwrites the buffer contents with new data of a given size.
Implemented in Sleak::RenderEngine::DirectX11Buffer, Sleak::RenderEngine::DirectX12Buffer, Sleak::RenderEngine::OpenGLBuffer, and Sleak::RenderEngine::VulkanBuffer.
|
protected |
Definition at line 61 of file BufferBase.hpp.
|
protected |
Definition at line 60 of file BufferBase.hpp.
|
protected |
Definition at line 64 of file BufferBase.hpp.
|
protected |
Definition at line 65 of file BufferBase.hpp.
|
protected |
Definition at line 66 of file BufferBase.hpp.
|
protected |
Definition at line 62 of file BufferBase.hpp.
|
protected |
Definition at line 58 of file BufferBase.hpp.
|
protected |
Definition at line 59 of file BufferBase.hpp.
|
protected |
Definition at line 57 of file BufferBase.hpp.