summaryrefslogtreecommitdiff
path: root/src/renderer/cleanroom
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-31 00:48:11 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-31 00:48:11 +1100
commitc4bf1916fe219324e14384fc938e767daeab26c9 (patch)
tree84b33ea8feff5792f77a8e832b66c2a23f1104b5 /src/renderer/cleanroom
parentb638fd776253fa0cb841175e3e134df4587101b6 (diff)
working on cube (hardcoded)
Diffstat (limited to 'src/renderer/cleanroom')
-rw-r--r--src/renderer/cleanroom/types.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/renderer/cleanroom/types.h b/src/renderer/cleanroom/types.h
index 23f2348..0a26120 100644
--- a/src/renderer/cleanroom/types.h
+++ b/src/renderer/cleanroom/types.h
@@ -77,10 +77,12 @@ typedef union vertex {
} vertex;
KITC_DECL_TYPED_ARRAY(vertex)
+KITC_DECL_TYPED_ARRAY(u32)
typedef struct geometry_data {
vertex_format format;
vertex_darray vertices;
+ u32_darray indices;
} geometry_data;
typedef struct mesh {
@@ -110,7 +112,7 @@ void texture_data_upload(texture_handle texture);
buffer_handle buffer_create(const char* debug_name, u64 size);
// models and meshes are implemented **in terms of the above**
-mesh mesh_create();
+mesh mesh_create(geometry_data* geometry);
model_handle model_load(const char* filepath);
/* ral.h */
@@ -123,10 +125,11 @@ void gpu_texture_init();
void gpu_texture_upload();
void gpu_buffer_init();
void gpu_buffer_upload();
+void gpu_buffer_bind();
// command buffer gubbins
-// 3. SIMA (simplified immediate mode api)
+// 3. SIMA (simplified immediate mode api) / render.h
// - dont need to worry about uploading mesh data
// - very useful for debugging
void imm_draw_cuboid();