summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorkkard2 <[email protected]>2025-09-01 20:31:56 +0200
committerkkard2 <[email protected]>2025-09-01 20:31:56 +0200
commit5dc417a737849472d4ecb7e187f01cf8bf0ecae0 (patch)
tree360bf4164ff3c943a75b54919e6055bf2f9b8be1 /example.c
parent3e5a38dbf6bc785e73ce127dbd2d9566b2dbf1c2 (diff)
move example out of platform code
Diffstat (limited to 'example.c')
-rw-r--r--example.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/example.c b/example.c
new file mode 100644
index 0000000..1ff063c
--- /dev/null
+++ b/example.c
@@ -0,0 +1,12 @@
+#include <assert.h>
+
+#define SPONGE_IMPLEMENTATION
+#include "sponge.h"
+
+void draw_frame(sponge_Canvas c) {
+ assert(c.width > 140 + 20);
+ assert(c.height > 70 + 40);
+ sponge_clear(c, 0xFF000000);
+ sponge_draw_rect(c, 80, 70, 80 + 20, 70 + 40, 0xFFFF00FF);
+ sponge_draw_rect(c, 140, 70, 140 + 20, 70 + 40, 0xFFFF00FF);
+}