summaryrefslogtreecommitdiff
path: root/src/rendering.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering.h')
-rw-r--r--src/rendering.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rendering.h b/src/rendering.h
index a3982cf..67f4682 100644
--- a/src/rendering.h
+++ b/src/rendering.h
@@ -6,6 +6,8 @@
#include "glad.h"
#include "utils.h"
+// TODO: review all structs and use types
+
enum image_type_e {
IMAGE_TYPE_2D = GL_TEXTURE_2D,
};
@@ -80,16 +82,14 @@ struct atlas_packer_s {
bool wayc_atlas_packer_allocate(struct atlas_packer_s* packer, u32 width,
u32 height, ivec2 out);
-typedef u32 vbo_t;
-
-bool wayc_vbo_init(vbo_t* vbo, usize size);
-bool wayc_vbo_upload(vbo_t vbo, usize offset, usize size, const u8* data);
-void wayc_vbo_use(vbo_t vbo);
-void wayc_vbo_deinit(vbo_t* vbo);
+enum buffer_type_e {
+ BUFFER_TYPE_VERTEX = GL_ARRAY_BUFFER,
+ BUFFER_TYPE_INDEX = GL_ELEMENT_ARRAY_BUFFER,
+};
-typedef u32 ebo_t;
+typedef u32 buffer_t;
-bool wayc_ebo_init(ebo_t* ebo, usize size);
-bool wayc_ebo_upload(ebo_t ebo, usize offset, usize size, const u8* data);
-void wayc_ebo_use(ebo_t ebo);
-void wayc_ebo_deinit(ebo_t* ebo);
+bool wayc_buffer_init(buffer_t* buffer, usize size);
+bool wayc_buffer_set(buffer_t buffer, usize offset, usize size, const u8* data);
+void wayc_buffer_use(buffer_t buffer, buffer_type_e type);
+void wayc_buffer_deinit(buffer_t* buffer);