From 47f1d6e5cc2c6a88b21479017deac737e65bdb9f Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 15 Dec 2010 00:03:47 +0000 Subject: [PATCH] Fixed build on QT Creqtor --- glm/glm.hpp | 9 ++++----- glm/gtx/simd_mat4.hpp | 2 +- glm/gtx/simd_vec4.hpp | 16 +++------------- glm/gtx/simd_vec4.inl | 2 +- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/glm/glm.hpp b/glm/glm.hpp index 4b9a944e..ea2f4678 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -108,16 +108,15 @@ namespace glm #if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC)) # define GLM_DEPRECATED __declspec(deprecated) # define GLM_RESTRICT __restrict -# define GLM_ALIGN(x) __declspec(align(x)) -//# define aligned(x) __declspec(align(x)) struct +# define GLM_ALIGNED(keyword, x) __declspec(align(x)) keyword #elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) -# define GLM_DEPRECATED deprecated +# define GLM_DEPRECATED /*deprecated*/ # define GLM_RESTRICT -# define GLM_ALIGN(x) __attribute__(aligned(x)) +# define GLM_ALIGNED(keyword, x) keyword __attribute__(aligned(x)) #else # define GLM_DEPRECATED # define GLM_RESTRICT -# define GLM_ALIGN(x) +# define GLM_ALIGN_UNION(x) union #endif//GLM_COMPILER //////////////////// diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index da28e06a..97299e88 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -24,7 +24,7 @@ namespace glm { namespace detail { - GLM_ALIGN(16) struct fmat4x4SIMD + GLM_ALIGNED(struct, 16) fmat4x4SIMD { static __m128 one; diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index ef9fb185..f8cf2d63 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -21,19 +21,9 @@ namespace glm { namespace detail - { - static __m128 one; - - GLM_ALIGN(4) union fvec4SIMD - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef tvec4 type; - typedef tvec4 bool_type; - + { + GLM_ALIGNED(union, 4) fvec4SIMD + { enum ctor{null}; typedef float value_type; typedef std::size_t size_type; diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index 58070f93..2aff9c97 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -11,7 +11,7 @@ namespace glm { namespace detail { - __m128 fvec4SIMD::one = _mm_set_ps1(1.f); + //__m128 fvec4SIMD::one = _mm_set_ps1(1.f); ////////////////////////////////////// // Implicit basic constructors