From 5dc417a737849472d4ecb7e187f01cf8bf0ecae0 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 1 Sep 2025 20:31:56 +0200 Subject: move example out of platform code --- example.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 example.c (limited to 'example.c') 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 + +#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); +} -- cgit v1.3.1