summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-28 18:27:30 +1100
committerquou <quou@disroot.org>2024-12-28 18:27:30 +1100
commite31535abfff4c3335dd465e3745a69d3102253a6 (patch)
tree48ff456b34ea295e3ea45c54cb0c97820f0290ec /sc
parent86810460eed75c19beb9f524e75c193edfa9ddfd (diff)
converting, loading and rendering GLTF models
Diffstat (limited to 'sc')
-rw-r--r--sc/sh_helpers.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/sh_helpers.h b/sc/sh_helpers.h
new file mode 100644
index 0000000..87c6e6a
--- /dev/null
+++ b/sc/sh_helpers.h
@@ -0,0 +1,14 @@
+int svariable_type_size(SVariable_Type type) {
+ switch (type) {
+ case svariable_type_float: return 4;
+ case svariable_type_vec2: return 8;
+ case svariable_type_vec3: return 12;
+ case svariable_type_vec4: return 16;
+ case svariable_type_mat2: return 16;
+ case svariable_type_mat3: return 36;
+ case svariable_type_mat4: return 64;
+ case svariable_type_count: break;
+ }
+ assert(0);
+ return 0;
+}