summaryrefslogtreecommitdiff
path: root/example.h
diff options
context:
space:
mode:
authorkkard2 <[email protected]>2025-09-21 14:09:45 +0200
committerkkard2 <[email protected]>2025-09-21 14:09:45 +0200
commit9463e07e2813cea94b9fd430b2fad938cad82673 (patch)
tree9791406e72f3b266d023390c6ead8baa45db647a /example.h
parent7ce5bb498bfe95a912f690e9d17c148114f02de0 (diff)
add perspective matrix and mesh drawing
Diffstat (limited to 'example.h')
-rw-r--r--example.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/example.h b/example.h
index df671e1..29212aa 100644
--- a/example.h
+++ b/example.h
@@ -1,8 +1,11 @@
#include <stdint.h>
+#define PI ((float)3.14159265358979323846)
+
void init();
void draw_frame(sponge_Texture c);
void mouse_move(int32_t x, int32_t y);
+void draw_frame_3d(sponge_Texture c, float *depths);
#ifdef SPONGE_EXAMPLE_IMPLEMENTATION
@@ -14,4 +17,10 @@ void init() {}
void mouse_move(int32_t x, int32_t y) {}
#endif // SPONGE_EXAMPLE_MOUSE_MOVE_DEFINED
+#ifndef SPONGE_EXAMPLE_DRAW_FRAME_3D_DEFINED
+void draw_frame_3d(sponge_Texture c, float *depths) {
+ draw_frame(c);
+}
+#endif // SPONGE_EXAMPLE_DRAW_FRAME_3D_DEFINED
+
#endif // SPONGE_EXAMPLE_IMPLEMENTATION