summaryrefslogtreecommitdiff
path: root/src/render/immdraw.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-10 14:06:15 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-10 14:06:15 +1000
commit9cb4bfacc69b2a95ce8e9250afc33fb04d1ba548 (patch)
treefbe75da188ac83b34153ac79c367b9d57e0d5ff9 /src/render/immdraw.h
parent071a635e63536e50abfad7d5aeca1208dba58025 (diff)
remove old code
Diffstat (limited to 'src/render/immdraw.h')
-rw-r--r--src/render/immdraw.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/render/immdraw.h b/src/render/immdraw.h
new file mode 100644
index 0000000..0d58375
--- /dev/null
+++ b/src/render/immdraw.h
@@ -0,0 +1,27 @@
+/**
+ * @brief Immediate-mode drawing APIs
+ */
+
+#pragma once
+#include "defines.h"
+#include "maths_types.h"
+#include "ral_impl.h"
+#include "render_types.h"
+
+typedef struct Immdraw_Storage {
+ Mesh plane;
+ Mesh cube;
+ Mesh sphere;
+ GPU_Pipeline* colour_pipeline;
+} Immdraw_Storage;
+
+// --- Public API
+
+PUB void Immdraw_Init(Immdraw_Storage* storage);
+PUB void Immdraw_Shutdown(Immdraw_Storage* storage);
+
+// These functions cause a pipeline switch and so aren't optimised for performance
+PUB void Immdraw_Plane(Transform tf, Vec4 colour, bool wireframe);
+PUB void Immdraw_Cuboid(Transform tf, Vec4 colour, bool wireframe);
+PUB void Immdraw_Sphere(Transform tf, f32 size, Vec4 colour, bool wireframe);
+PUB void Immdraw_TransformGizmo(Transform tf, f32 size);