1#ifndef _BUFFERBASE_HPP_
2#define _BUFFERBASE_HPP_
19 virtual bool Map() = 0;
23 virtual void Update(
void* data,
size_t size) = 0;
Backend-agnostic GPU buffer: vertex, index, constant, or resource view target.
virtual void * GetData()=0
const void * m_cpuShadowCopy
virtual bool Map()=0
Maps the buffer for CPU writes; returns false if already mapped or unmappable.
uint32_t GetVertexFormat() const
Registered custom vertex layout of this buffer; 0 means the engine default Vertex.
const void * GetCPUShadowCopy() const
size_t m_cpuShadowCopySize
virtual void Update(void *data, size_t size)=0
Overwrites the buffer contents with new data of a given size.
char m_cpuShadowStorage[128]
size_t GetCPUShadowCopySize() const
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.
Common lifecycle contract for GPU-backed resources: init, per-frame update, teardown.
Backend-facing rendering layer shared by the four graphics backends.
BufferType
GPU buffer usage kind, drives backend binding flags and layout.
Root namespace for everything the engine exposes.