From 6347ee483182bf8c5d139d1110ce2c335af60e4f Mon Sep 17 00:00:00 2001
From: 3gg <3gg@shellblade.net>
Date: Wed, 28 Aug 2024 09:42:03 -0700
Subject: Add demo skeleton.

---
 app/demo/CMakeLists.txt | 15 +++++++++++++++
 app/demo/main.c         | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 app/demo/CMakeLists.txt
 create mode 100644 app/demo/main.c

(limited to 'app/demo')

diff --git a/app/demo/CMakeLists.txt b/app/demo/CMakeLists.txt
new file mode 100644
index 0000000..bbb3aae
--- /dev/null
+++ b/app/demo/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(gfxappdemo)
+
+set(CMAKE_C_STANDARD 17)
+set(CMAKE_C_STANDARD_REQUIRED On)
+set(CMAKE_C_EXTENSIONS Off)
+
+add_executable(gfxappdemo
+  main.c)
+
+target_link_libraries(gfxappdemo PRIVATE
+  gfx-app)
+
+target_compile_options(gfxappdemo PRIVATE -Wall -Wextra -Wpedantic)
diff --git a/app/demo/main.c b/app/demo/main.c
new file mode 100644
index 0000000..0b83711
--- /dev/null
+++ b/app/demo/main.c
@@ -0,0 +1,47 @@
+#include <gfx/app.h>
+
+#include <assert.h>
+
+const int   WIDTH   = 960;
+const int   HEIGHT  = 600;
+const int   MAX_FPS = 60;
+const char* TITLE   = "iso3d";
+
+typedef struct GfxAppState {
+  int unused;
+} GfxAppState;
+
+bool Init(GfxAppState* state, int argc, const char** argv) {
+  assert(state);
+
+  (void)argc;
+  (void)argv;
+
+  return true;
+}
+
+void Shutdown(GfxAppState* state) {
+  assert(state);
+  //
+}
+
+void Update(GfxAppState* state, double t, double dt) {
+  assert(state);
+
+  (void)t;
+  (void)dt;
+}
+
+void Render(GfxAppState* state) {
+  assert(state);
+  //
+}
+
+void Resize(GfxAppState* state, int width, int height) {
+  assert(state);
+
+  (void)width;
+  (void)height;
+}
+
+GFX_APP_MAIN(WIDTH, HEIGHT, MAX_FPS, TITLE)
-- 
cgit v1.2.3