From e31535abfff4c3335dd465e3745a69d3102253a6 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 28 Dec 2024 18:27:30 +1100 Subject: converting, loading and rendering GLTF models --- sc/sh_helpers.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sc/sh_helpers.h (limited to 'sc') 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; +} -- cgit v1.2.3-54-g00ecf