diff options
| author | kkard2 <[email protected]> | 2025-09-22 17:21:30 +0200 |
|---|---|---|
| committer | kkard2 <[email protected]> | 2025-09-22 17:21:30 +0200 |
| commit | a17e7369bfe9cb4a23225084a396ec92823bad2b (patch) | |
| tree | b229b07c1a1c131467f61010eec985b62293897e /examples/example.h | |
| parent | 2d0894f9887f9e100d7546b6ca93934eced93e39 (diff) | |
reorganize examples
Diffstat (limited to 'examples/example.h')
| -rw-r--r-- | examples/example.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/example.h b/examples/example.h new file mode 100644 index 0000000..29212aa --- /dev/null +++ b/examples/example.h @@ -0,0 +1,26 @@ +#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 + +#ifndef SPONGE_EXAMPLE_INIT_DEFINED +void init() {} +#endif // SPONGE_EXAMPLE_INIT_DEFINED + +#ifndef SPONGE_EXAMPLE_MOUSE_MOVE_DEFINED +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 |
