aboutsummaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-10-30 20:08:53 -0700
committer3gg <3gg@shellblade.net>2025-10-30 20:08:53 -0700
commit6fde17649f7404e79a17d4d8f96662d03011aca1 (patch)
treea93738b26dab567fe551b62e2a4bd1b1556460b1 /src/types.h
parent440b292c39162284a447b34d3a692143af9fbc87 (diff)
Move animation module outside of scene/
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
new file mode 100644
index 0000000..d0ffc41
--- /dev/null
+++ b/src/types.h
@@ -0,0 +1,24 @@
1/// Strongly-typed indices for every kind of scene node resource.
2#pragma once
3
4#include <stdint.h>
5
6typedef uint16_t gfx_idx;
7
8#define DEF_STRONG_INDEX(TYPE_NAME, IDX_TYPE) \
9 typedef struct TYPE_NAME##_idx { \
10 IDX_TYPE val; \
11 } TYPE_NAME##_idx;
12
13DEF_STRONG_INDEX(anima, gfx_idx)
14DEF_STRONG_INDEX(animation, gfx_idx)
15DEF_STRONG_INDEX(camera, gfx_idx)
16DEF_STRONG_INDEX(light, gfx_idx)
17DEF_STRONG_INDEX(material, gfx_idx)
18DEF_STRONG_INDEX(mesh, gfx_idx)
19DEF_STRONG_INDEX(mesh_link, gfx_idx)
20DEF_STRONG_INDEX(model, gfx_idx)
21DEF_STRONG_INDEX(node, gfx_idx)
22DEF_STRONG_INDEX(object, gfx_idx)
23DEF_STRONG_INDEX(scene, gfx_idx)
24DEF_STRONG_INDEX(skeleton, gfx_idx)