From a0b835d2f5f988f1d9428ace88b3d17e6b637ee8 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 14 Dec 2010 22:34:11 +0000 Subject: [PATCH] Fixed build on Mac GCC --- glm/core/dummy.cpp | 4 ++-- glm/core/intrinsic_common.inl | 3 ++- glm/gtx/simd_mat4.hpp | 1 + glm/gtx/simd_vec4.hpp | 16 ++++++++++++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/glm/core/dummy.cpp b/glm/core/dummy.cpp index 8f747d4a..c50a036d 100644 --- a/glm/core/dummy.cpp +++ b/glm/core/dummy.cpp @@ -85,7 +85,7 @@ int main() glm::mat4x3 p = x * m; glm::mat4x3 q = m * x; } - +/* class test { private: @@ -101,7 +101,7 @@ int main() { TestMap.insert(std::make_pair(3, new test)); } - +*/ //{ // glm::mat3x4 m(1.0f); // glm::vec3 v(1.0f); diff --git a/glm/core/intrinsic_common.inl b/glm/core/intrinsic_common.inl index aa7ea584..28ad3c6c 100644 --- a/glm/core/intrinsic_common.inl +++ b/glm/core/intrinsic_common.inl @@ -164,11 +164,12 @@ inline __m128 _mm_flr_ps(__m128 x) } //trunc +/* inline __m128 _mm_trc_ps(__m128 v) { return __m128(); } - +*/ //round inline __m128 _mm_rnd_ps(__m128 x) { diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index ee5b2bc0..da28e06a 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -16,6 +16,7 @@ // Dependency: #include "../glm.hpp" +#include "../gtx/simd_vec4.hpp" #include #include diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 997fb1d1..ef9fb185 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -21,9 +21,19 @@ 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; + enum ctor{null}; typedef float value_type; typedef std::size_t size_type; @@ -32,8 +42,6 @@ namespace glm typedef fvec4SIMD type; typedef tvec4 bool_type; - static __m128 one; - __m128 Data; float Array[4]; struct{float x, y, z, w;};