summaryrefslogtreecommitdiff
path: root/examples/example.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example.h')
-rw-r--r--examples/example.h26
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