gryphn buffer API

This commit is contained in:
Greg Wells
2025-06-06 12:08:20 -04:00
parent ba20d5a958
commit aff94e1085
5 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include "stdlib.h"
#include "utils/gryphn_error_code.h"
#include <core/gryphn_handles.h>
typedef enum gnBufferType {
GN_VERTEX_BUFFER = 0x00000001
} gnBufferType;
typedef struct gnBufferInfo {
size_t size;
gnBufferType type;
} gnBufferInfo;
#ifdef GN_REVEAL_IMPL
struct gnBuffer_t {
struct gnPlatformBuffer_t* buffer;
gnDeviceHandle device;
};
#endif
gnReturnCode gnCreateBuffer(gnBufferHandle* buffer, gnOutputDeviceHandle device, gnBufferInfo info);
void gnDestroyBuffer(gnBufferHandle buffer);