From 9463e07e2813cea94b9fd430b2fad938cad82673 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Sun, 21 Sep 2025 14:09:45 +0200 Subject: add perspective matrix and mesh drawing --- example.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'example.h') diff --git a/example.h b/example.h index df671e1..29212aa 100644 --- a/example.h +++ b/example.h @@ -1,8 +1,11 @@ #include +#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 -- cgit v1.3.1