summaryrefslogtreecommitdiff
path: root/app/demo/main.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-08-28 09:42:03 -0700
committer3gg <3gg@shellblade.net>2024-08-28 09:42:03 -0700
commit6347ee483182bf8c5d139d1110ce2c335af60e4f (patch)
treed679560f00b53c7d6626448a36e87586c3897ac9 /app/demo/main.c
parentbc11af703e622dcc95ac337ad1a68db2d4cc16c0 (diff)
Add demo skeleton.
Diffstat (limited to 'app/demo/main.c')
-rw-r--r--app/demo/main.c47
1 files changed, 47 insertions, 0 deletions
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 @@
1#include <gfx/app.h>
2
3#include <assert.h>
4
5const int WIDTH = 960;
6const int HEIGHT = 600;
7const int MAX_FPS = 60;
8const char* TITLE = "iso3d";
9
10typedef struct GfxAppState {
11 int unused;
12} GfxAppState;
13
14bool Init(GfxAppState* state, int argc, const char** argv) {
15 assert(state);
16
17 (void)argc;
18 (void)argv;
19
20 return true;
21}
22
23void Shutdown(GfxAppState* state) {
24 assert(state);
25 //
26}
27
28void Update(GfxAppState* state, double t, double dt) {
29 assert(state);
30
31 (void)t;
32 (void)dt;
33}
34
35void Render(GfxAppState* state) {
36 assert(state);
37 //
38}
39
40void Resize(GfxAppState* state, int width, int height) {
41 assert(state);
42
43 (void)width;
44 (void)height;
45}
46
47GFX_APP_MAIN(WIDTH, HEIGHT, MAX_FPS, TITLE)