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

@@ -81,7 +81,7 @@ glm_mat3_copy(mat3 mat, mat3 dest) {
CGLM_INLINE
void
glm_mat3_identity(mat3 mat) {
CGLM_ALIGN(16) mat3 t = GLM_MAT3_IDENTITY_INIT;
CGLM_ALIGN_MAT mat3 t = GLM_MAT3_IDENTITY_INIT;
glm_mat3_copy(t, mat);
}
@@ -155,7 +155,7 @@ glm_mat3_transpose_to(mat3 m, mat3 dest) {
CGLM_INLINE
void
glm_mat3_transpose(mat3 m) {
CGLM_ALIGN(16) mat3 tmp;
CGLM_ALIGN_MAT mat3 tmp;
tmp[0][1] = m[1][0];
tmp[0][2] = m[2][0];