summaryrefslogtreecommitdiff
path: root/src/renderer/immediate.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-06-17 22:17:48 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-06-18 10:30:28 +1000
commit4b5695ce26a8f821dfac987e8e11a6ba5eeff610 (patch)
tree0cd8f80bdb0520ffcf0cd62851f72055d4ee5546 /src/renderer/immediate.h
parentf1cb5bece520dba63fa77e4721909ab8f0a6c26f (diff)
start working on a immediate mode drawing API
Diffstat (limited to 'src/renderer/immediate.h')
-rw-r--r--src/renderer/immediate.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/renderer/immediate.h b/src/renderer/immediate.h
index b9d7c61..f4b1729 100644
--- a/src/renderer/immediate.h
+++ b/src/renderer/immediate.h
@@ -3,18 +3,17 @@
#include "geometry.h"
#include "maths_types.h"
+typedef struct immdraw_system immdraw_system;
+
+bool immdraw_system_init(immdraw_system* state);
+void immdraw_system_shutdown(immdraw_system* state);
+void immdraw_system_render(immdraw_system* state);
+
// 3. SIMA (simplified immediate mode api) / render.h
// - dont need to worry about uploading mesh data
// - very useful for debugging
-void imm_draw_cuboid(vec3 pos, quat rotation, f32x3 extents, vec4 colour);
-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
+void immdraw_plane(vec3 pos, quat rotation, f32 u_scale, f32 v_scale, vec4 colour);
+void immdraw_cuboid(vec3 pos, quat rotation, f32x3 extents, vec4 colour);
+void immdraw_sphere(vec3 pos, f32 radius, vec4 colour);
-// 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
+void immdraw_camera_frustum();