Selaa lähdekoodia

Fixed build on Mac GCC

Christophe Riccio 15 vuotta sitten
vanhempi
sitoutus
a0b835d2f5
4 muutettua tiedostoa jossa 17 lisäystä ja 7 poistoa
  1. 2 2
      glm/core/dummy.cpp
  2. 2 1
      glm/core/intrinsic_common.inl
  3. 1 0
      glm/gtx/simd_mat4.hpp
  4. 12 4
      glm/gtx/simd_vec4.hpp

+ 2 - 2
glm/core/dummy.cpp

@@ -85,7 +85,7 @@ int main()
 		glm::mat4x3 p = x * m;
 		glm::mat4x3 p = x * m;
 		glm::mat4x3 q = m * x;
 		glm::mat4x3 q = m * x;
 	}
 	}
-
+/*
 	class test
 	class test
 	{
 	{
 	private:
 	private:
@@ -101,7 +101,7 @@ int main()
 	{
 	{
 		TestMap.insert(std::make_pair(3, new test));
 		TestMap.insert(std::make_pair(3, new test));
 	}
 	}
-
+*/
 	//{
 	//{
 	//	glm::mat3x4 m(1.0f);
 	//	glm::mat3x4 m(1.0f);
 	//	glm::vec3 v(1.0f);
 	//	glm::vec3 v(1.0f);

+ 2 - 1
glm/core/intrinsic_common.inl

@@ -164,11 +164,12 @@ inline __m128 _mm_flr_ps(__m128 x)
 }
 }
 
 
 //trunc
 //trunc
+/*
 inline __m128 _mm_trc_ps(__m128 v)
 inline __m128 _mm_trc_ps(__m128 v)
 {
 {
 	return __m128();
 	return __m128();
 }
 }
-
+*/
 //round
 //round
 inline __m128 _mm_rnd_ps(__m128 x)
 inline __m128 _mm_rnd_ps(__m128 x)
 {
 {

+ 1 - 0
glm/gtx/simd_mat4.hpp

@@ -16,6 +16,7 @@
 
 
 // Dependency:
 // Dependency:
 #include "../glm.hpp"
 #include "../glm.hpp"
+#include "../gtx/simd_vec4.hpp"
 #include <xmmintrin.h>
 #include <xmmintrin.h>
 #include <emmintrin.h>
 #include <emmintrin.h>
 
 

+ 12 - 4
glm/gtx/simd_vec4.hpp

@@ -21,9 +21,19 @@
 namespace glm
 namespace glm
 {
 {
 	namespace detail
 	namespace detail
-	{
+        {
+                static __m128 one;
+
 		GLM_ALIGN(4) union fvec4SIMD
 		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<T> type;
+                    typedef tvec4<bool> bool_type;
+
 			enum ctor{null};
 			enum ctor{null};
 			typedef float value_type;
 			typedef float value_type;
 			typedef std::size_t size_type;
 			typedef std::size_t size_type;
@@ -32,8 +42,6 @@ namespace glm
 			typedef fvec4SIMD type;
 			typedef fvec4SIMD type;
 			typedef tvec4<bool> bool_type;
 			typedef tvec4<bool> bool_type;
 
 
-			static __m128 one;
-
 			__m128 Data;
 			__m128 Data;
 			float Array[4];
 			float Array[4];
 			struct{float x, y, z, w;};
 			struct{float x, y, z, w;};