Add macro for automatic alignment of matrices

This commit is contained in:
Jonathan Platzer
2018-07-19 10:14:30 +02:00
parent 2d63d7e0cd
commit cc5f533fc9
6 changed files with 15 additions and 9 deletions

View File

@@ -26,6 +26,12 @@
# define CGLM_ALIGN_IF(X) /* no alignment */
#endif
#ifdef __AVX__
# define CGLM_ALIGN_MAT CGLM_ALIGN(32)
#else
# define CGLM_ALIGN_MAT CGLM_ALIGN(16)
#endif
typedef float vec2[2];
typedef CGLM_ALIGN_IF(8) float vec3[3];
typedef int ivec3[3];