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; }