26#include <SDL3/SDL_gpu.h>
28#include <Objectively/Data.h>
29#include <Objectively/Object.h>
41typedef struct BufferInterface BufferInterface;
104struct BufferInterface {
109 ObjectInterface objectInterface;
125 Buffer *(*initWithConstMem)(
Buffer *self,
RenderDevice *device, SDL_GPUBufferUsageFlags usage,
const void *mem, Uint32 size);
161 void (*setName)(
Buffer *self,
const char *name);
177 void (*upload)(
Buffer *self,
const void *data, Uint32 size, Uint32 offset,
bool cycle);
194 void (*uploadWithPass)(
Buffer *self,
CopyPass *copyPass,
const void *data, Uint32 size, Uint32 offset,
bool cycle);
OBJECTIVELYGPU_EXPORT Class * _Buffer(void)
Definition Buffer.c:175
#define OBJECTIVELYGPU_EXPORT
Definition Types.h:35
An SDL_GPUBuffer (vertex, index, indirect, storage, etc.) and its metadata.
Definition Buffer.h:61
BufferInterface * interface
The interface.
Definition Buffer.h:72
Uint32 size
The size of the buffer, in bytes.
Definition Buffer.h:87
SDL_GPUBuffer * buffer
The underlying SDL buffer.
Definition Buffer.h:77
ident data
User data.
Definition Buffer.h:98
Object object
The superclass.
Definition Buffer.h:66
SDL_GPUBufferUsageFlags usage
The usage flags the buffer was created with.
Definition Buffer.h:82
A scoped copy pass for uploading CPU data and copying GPU resources.
Definition CopyPass.h:55
The RenderDevice encapsulates an SDL_GPUDevice and provides methods for allocating GPU resources,...
Definition RenderDevice.h:63