align vec4/mat4 to 16 in typedef

This commit is contained in:
Recep Aslantas
2016-09-17 12:54:24 +03:00
parent d4c6ae350f
commit 2366e3b85a
2 changed files with 3 additions and 1 deletions

View File

@@ -12,8 +12,10 @@
#if defined(_WIN32)
# define CGLM_INLINE __forceinline
# define CGLM_ALIGN(X) __declspec(align(X))
#else
# define CGLM_INLINE static inline __attribute((always_inline))
# define CGLM_ALIGN(X) __attribute((aligned(X)))
#endif
#define glm__memcpy(type, dest, src, size) \

View File

@@ -11,7 +11,7 @@
#include "cglm-common.h"
typedef float vec3[3];
typedef float vec4[4];
typedef CGLM_ALIGN(16) float vec4[4];
typedef vec3 mat3[3];
typedef vec4 mat4[4];