summaryrefslogtreecommitdiff
path: root/src/renderer/cleanroom/simda.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-31 17:37:40 +1100
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-31 17:37:40 +1100
commit1a55bc92eaae3509a18e468198772b8888397492 (patch)
tree25b75d8b0f62d76c815af2e1dc096827a84b0248 /src/renderer/cleanroom/simda.h
parent1b4c27d514423c9e27a93742b8c8e9eb9f588e27 (diff)
redesigning the renderer backend
Diffstat (limited to 'src/renderer/cleanroom/simda.h')
-rw-r--r--src/renderer/cleanroom/simda.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/renderer/cleanroom/simda.h b/src/renderer/cleanroom/simda.h
new file mode 100644
index 0000000..d0b4794
--- /dev/null
+++ b/src/renderer/cleanroom/simda.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "maths_types.h"
+
+// 3. SIMA (simplified immediate mode api) / render.h
+// - dont need to worry about uploading mesh data
+// - very useful for debugging
+void imm_draw_cuboid();
+void imm_draw_sphere(vec3 pos, f32 radius, vec4 colour);
+void imm_draw_camera_frustum();
+static void imm_draw_model(
+ const char* model_filepath); // tracks internally whether the model is loaded
+
+static void imm_draw_model(const char* model_filepath) {
+ // check that model is loaded
+ // if not loaded, load model and upload to gpu - LRU cache for models
+ // else submit draw call
+} \ No newline at end of file