From 816b6b8c34d9204298b49fa810d02d094be7ca62 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 23 Dec 2015 01:24:48 +0100 Subject: [PATCH 1/4] Fix wrong docs The function this function is a helper of is using radians. In fact, glm is using radians everywhere! --- glm/gtx/transform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index 7e6a4a73..5d22fba5 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -64,7 +64,7 @@ namespace glm GLM_FUNC_DECL tmat4x4 translate( tvec3 const & v); - /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. /// @see gtc_matrix_transform /// @see gtx_transform template From 22467f00f89a2d436e57b9980b29e259f5683c88 Mon Sep 17 00:00:00 2001 From: Stephen Hill Date: Wed, 23 Dec 2015 12:16:31 -0500 Subject: [PATCH 2/4] Fixed "Declaration shadows a field" warning --- glm/detail/type_half.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/detail/type_half.inl b/glm/detail/type_half.inl index ff8740c8..b9f9f0ed 100644 --- a/glm/detail/type_half.inl +++ b/glm/detail/type_half.inl @@ -52,12 +52,12 @@ namespace detail i(0) {} - GLM_FUNC_QUALIFIER uif32(float f) : - f(f) + GLM_FUNC_QUALIFIER uif32(float f_) : + f(f_) {} - GLM_FUNC_QUALIFIER uif32(uint32 i) : - i(i) + GLM_FUNC_QUALIFIER uif32(uint32 i_) : + i(i_) {} float f; From 89cecd373a2acec765e77927448c76aad2e881dd Mon Sep 17 00:00:00 2001 From: Stephen Hill Date: Wed, 23 Dec 2015 12:18:14 -0500 Subject: [PATCH 3/4] Fixed 'GLM_COMPILER_VC2005 is not defined' warning This GLM compiler version isn't defined, so I just removed the legacy functions. --- glm/detail/setup.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 2478c3ef..dbbb730a 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -457,13 +457,6 @@ #endif//GLM_ARCH #if GLM_ARCH & GLM_ARCH_SSE2 # include -# if(GLM_COMPILER == GLM_COMPILER_VC2005) // VC2005 is missing some intrinsics, workaround - inline float _mm_cvtss_f32(__m128 A) { return A.m128_f32[0]; } - inline __m128 _mm_castpd_ps(__m128d PD) { union { __m128 ps; __m128d pd; } c; c.pd = PD; return c.ps; } - inline __m128d _mm_castps_pd(__m128 PS) { union { __m128 ps; __m128d pd; } c; c.ps = PS; return c.pd; } - inline __m128i _mm_castps_si128(__m128 PS) { union { __m128 ps; __m128i pi; } c; c.ps = PS; return c.pi; } - inline __m128 _mm_castsi128_ps(__m128i PI) { union { __m128 ps; __m128i pi; } c; c.pi = PI; return c.ps; } -# endif #endif//GLM_ARCH #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED) From 47a2a6adfbb58bf3104165cf67d916573336b926 Mon Sep 17 00:00:00 2001 From: Stephen Hill Date: Wed, 23 Dec 2015 12:19:13 -0500 Subject: [PATCH 4/4] Fixed various 'X is not defined' warnings --- glm/detail/setup.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index dbbb730a..237d41ea 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -395,13 +395,13 @@ #elif defined(GLM_FORCE_SSE2) # define GLM_ARCH (GLM_ARCH_SSE2) #elif (GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX)) -# if(__AVX2__) +# if defined(__AVX2__) # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif(__AVX__) +# elif defined(__AVX__) # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif(__SSE3__) +# elif defined(__SSE3__) # define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif(__SSE2__) +# elif defined(__SSE2__) # define GLM_ARCH (GLM_ARCH_SSE2) # else # define GLM_ARCH GLM_ARCH_PURE @@ -1001,7 +1001,7 @@ namespace detail } }//namespace glm # define GLM_COUNTOF(arr) glm::countof(arr) -#elif _MSC_VER +#elif defined(_MSC_VER) # define GLM_COUNTOF(arr) _countof(arr) #else # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])