From 7219b02d2350f9a936192d477504adb14294606a Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 25 Dec 2018 10:08:36 +0300 Subject: [PATCH] remove alignment from vec3 and mat3 --- include/cglm/types.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/include/cglm/types.h b/include/cglm/types.h index cad1042..1190b73 100644 --- a/include/cglm/types.h +++ b/include/cglm/types.h @@ -10,12 +10,12 @@ #if defined(_MSC_VER) /* do not use alignment for older visual studio versions */ -#if _MSC_VER < 1913 /* Visual Studio 2017 version 15.6 */ -# define CGLM_ALL_UNALIGNED -# define CGLM_ALIGN(X) /* no alignment */ -#else -# define CGLM_ALIGN(X) __declspec(align(X)) -#endif +# if _MSC_VER < 1913 /* Visual Studio 2017 version 15.6 */ +# define CGLM_ALL_UNALIGNED +# define CGLM_ALIGN(X) /* no alignment */ +# else +# define CGLM_ALIGN(X) __declspec(align(X)) +# endif #else # define CGLM_ALIGN(X) __attribute((aligned(X))) #endif @@ -33,20 +33,18 @@ #endif typedef float vec2[2]; -typedef CGLM_ALIGN_IF(8) float vec3[3]; +typedef float vec3[3]; typedef int ivec3[3]; typedef CGLM_ALIGN_IF(16) float vec4[4]; +typedef vec4 versor; +typedef vec3 mat3[3]; #ifdef __AVX__ -typedef CGLM_ALIGN_IF(32) vec3 mat3[3]; typedef CGLM_ALIGN_IF(32) vec4 mat4[4]; #else -typedef vec3 mat3[3]; typedef CGLM_ALIGN_IF(16) vec4 mat4[4]; #endif -typedef vec4 versor; - #define GLM_E 2.71828182845904523536028747135266250 /* e */ #define GLM_LOG2E 1.44269504088896340735992468100189214 /* log2(e) */ #define GLM_LOG10E 0.434294481903251827651128918916605082 /* log10(e) */