diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/sh_helpers.h | 14 |
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; +} |