Browse Source

Fixed build on QT Creqtor

Christophe Riccio 15 years ago
parent
commit
47f1d6e5cc
4 changed files with 9 additions and 20 deletions
  1. 4 5
      glm/glm.hpp
  2. 1 1
      glm/gtx/simd_mat4.hpp
  3. 3 13
      glm/gtx/simd_vec4.hpp
  4. 1 1
      glm/gtx/simd_vec4.inl

+ 4 - 5
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
 
 ////////////////////

+ 1 - 1
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;
 

+ 3 - 13
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<T> type;
-                    typedef tvec4<bool> bool_type;
-
+	{
+		GLM_ALIGNED(union, 4) fvec4SIMD
+		{
 			enum ctor{null};
 			typedef float value_type;
 			typedef std::size_t size_type;

+ 1 - 1
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