From 9bad7f048e1e622763e72629efd9437bca7c00c1 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 1 Feb 2011 10:53:18 +0000 Subject: [PATCH 1/8] Force SSE AVX instructions --- glm/setup.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glm/setup.hpp b/glm/setup.hpp index 950b58cc..14a0966b 100644 --- a/glm/setup.hpp +++ b/glm/setup.hpp @@ -249,7 +249,7 @@ ///////////////// // Platform -// User defines: GLM_FORCE_PURE +// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX #define GLM_ARCH_PURE 0x0000 //(0x0000) #define GLM_ARCH_SSE2 0x0001 //(0x0001) @@ -258,6 +258,12 @@ #if(defined(GLM_FORCE_PURE)) # define GLM_ARCH GLM_ARCH_PURE +#elif(defined(GLM_FORCE_AVX)) +# define GLM_ARCH GLM_ARCH_AVX +#elif(defined(GLM_FORCE_SSE3)) +# define GLM_ARCH GLM_ARCH_SSE3 +#elif(defined(GLM_FORCE_SSE2)) +# define GLM_ARCH GLM_ARCH_SSE2 #elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64))) # if(defined(_M_CEE_PURE)) # define GLM_ARCH GLM_ARCH_PURE From 529e174932c603b1a4ffbd6d8d67f2c2abec2ac2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 1 Feb 2011 12:43:51 +0000 Subject: [PATCH 2/8] Fixed typo --- glm/setup.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glm/setup.hpp b/glm/setup.hpp index 14a0966b..510fbebc 100644 --- a/glm/setup.hpp +++ b/glm/setup.hpp @@ -22,9 +22,9 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// // Compiler -// User defines: GLM_FORCE_COMPILER_UNKNOWNED +// User defines: GLM_FORCE_COMPILER_UNKNOWN -#define GLM_COMPILER_UNKNOWNED 0x00000000 +#define GLM_COMPILER_UNKNOWN 0x00000000 // Visual C++ defines #define GLM_COMPILER_VC 0x01000000 @@ -76,8 +76,8 @@ #define GLM_COMPILER_CODEWARRIOR 0x04000000 // Force generic C++ compiler -#ifdef GLM_FORCE_COMPILER_UNKNOWNED -# define GLM_COMPILER GLM_COMPILER_UNKNOWNED +#ifdef GLM_FORCE_COMPILER_UNKNOWN +# define GLM_COMPILER GLM_COMPILER_UNKNOWN // Visual C++ #elif defined(_MSC_VER) # if _MSC_VER == 900 @@ -157,7 +157,7 @@ # define GLM_COMPILER GLM_COMPILER_CODEWARRIOR #else -# define GLM_COMPILER GLM_COMPILER_UNKNOWNED +# define GLM_COMPILER GLM_COMPILER_UNKNOWN #endif #ifndef GLM_COMPILER @@ -350,7 +350,7 @@ # elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT) # pragma message("GLM: Multiple vector component names through Visual C++ language extensions") # else -# error "GLM_COMPONENT value unknowned" +# error "GLM_COMPONENT value unknown" # endif//GLM_MESSAGE_COMPONENT_DISPLAYED #endif//GLM_MESSAGE From d0cfa0bc72532f7271f02dcde5d6aef12bebffc0 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 1 Feb 2011 23:27:38 +0000 Subject: [PATCH 3/8] Added google analystic --- doc/src/about.xsl | 13 +++++++++++++ doc/src/code.xsl | 13 +++++++++++++ doc/src/data.xml | 22 ++++++++++++---------- doc/src/download.xsl | 13 +++++++++++++ doc/src/goodies.xsl | 13 +++++++++++++ doc/src/link.xsl | 13 +++++++++++++ doc/src/news.xsl | 13 +++++++++++++ 7 files changed, 90 insertions(+), 10 deletions(-) diff --git a/doc/src/about.xsl b/doc/src/about.xsl index 6ca8854c..9684dc0d 100644 --- a/doc/src/about.xsl +++ b/doc/src/about.xsl @@ -12,6 +12,19 @@ + + diff --git a/doc/src/code.xsl b/doc/src/code.xsl index f9650409..74b16226 100644 --- a/doc/src/code.xsl +++ b/doc/src/code.xsl @@ -12,6 +12,19 @@ + +
diff --git a/doc/src/data.xml b/doc/src/data.xml index 7b66dbc4..f3f3d103 100644 --- a/doc/src/data.xml +++ b/doc/src/data.xml @@ -3,7 +3,7 @@
- + @@ -56,7 +56,7 @@
- + @@ -1540,7 +1540,7 @@ - + This new version of GLM is bringing a lot of improvements and maybe too many considering the development time it has required: API exposing SIMD implementation but also some new, safe and feature complet swizzling functions and a new setup API. @@ -1563,17 +1563,19 @@ and float to __m128). This implementation can probably be improve in many ways so don't hesitate to send me some feedbacks. - GLM 0.9.1 is not 100% backward compatible with GLM 0.9.0 but mostly advanced usages should be concerned by this compatibility issues. + + UPDATED: SF.net has been the target of a directed attack. + The upload system is currently disrupted which has corrupted GLM 0.9.1.A files. + As a temporary mesure, the files are now hosted on Google Code. + - - GLM 0.9.1.A (zip, 2.7 MB) - GLM 0.9.1.A (7z, 1.7 MB) - - - + GLM 0.9.1.A (zip, 3.0 MB) + GLM 0.9.1.A (7z, 2.0 MB) + GLM Manual + Submit a bug report diff --git a/doc/src/download.xsl b/doc/src/download.xsl index 51c4c98b..705e6f52 100644 --- a/doc/src/download.xsl +++ b/doc/src/download.xsl @@ -12,6 +12,19 @@ + +
diff --git a/doc/src/goodies.xsl b/doc/src/goodies.xsl index 6b27bd40..d21c7a8a 100644 --- a/doc/src/goodies.xsl +++ b/doc/src/goodies.xsl @@ -12,6 +12,19 @@ + +
diff --git a/doc/src/link.xsl b/doc/src/link.xsl index 082e51a4..a100016f 100644 --- a/doc/src/link.xsl +++ b/doc/src/link.xsl @@ -12,6 +12,19 @@ + +
diff --git a/doc/src/news.xsl b/doc/src/news.xsl index bc888916..44d895ce 100644 --- a/doc/src/news.xsl +++ b/doc/src/news.xsl @@ -12,6 +12,19 @@ + +
From 6d162e9a3418bbfa3d3de9d699401c151c681fb7 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 2 Feb 2011 23:57:38 +0000 Subject: [PATCH 4/8] Updated post --- doc/src/data.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/src/data.xml b/doc/src/data.xml index f3f3d103..0f9f2553 100644 --- a/doc/src/data.xml +++ b/doc/src/data.xml @@ -3,7 +3,7 @@
- + @@ -56,7 +56,7 @@
- + @@ -1567,13 +1567,11 @@ GLM 0.9.1 is not 100% backward compatible with GLM 0.9.0 but mostly advanced usages should be concerned by this compatibility issues. - UPDATED: SF.net has been the target of a directed attack. - The upload system is currently disrupted which has corrupted GLM 0.9.1.A files. - As a temporary mesure, the files are now hosted on Google Code. + UPDATED: SF.net mirrors are available again. - GLM 0.9.1.A (zip, 3.0 MB) - GLM 0.9.1.A (7z, 2.0 MB) + GLM 0.9.1.A (zip, 3.0 MB) + GLM 0.9.1.A (7z, 2.0 MB) GLM Manual Submit a bug report From a6d1c4266e17fec9ffc262d86a2345cfb603e85c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 3 Feb 2011 23:48:49 +0000 Subject: [PATCH 5/8] Added development option, through an error message to user who want to build GLM --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db4774d0..1ab29af1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,5 +19,8 @@ add_subdirectory(test) add_subdirectory(bench) add_subdirectory(doc) - +option(GLM_DEVELOPMENT_MODE "GLM development" OFF) +if(NOT GLM_DEVELOPMENT_MODE) + message(FATAL_ERROR "GLM is a header only library, no need to build it") +endif() From 3481b82b6b796b4e0c6d2794880601a3924798cc Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 3 Feb 2011 23:58:24 +0000 Subject: [PATCH 6/8] Added developer option --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0007705..524241dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,5 +8,9 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_subdirectory(glm) add_subdirectory(doc) +option(GLM_DEVELOPMENT_MODE "GLM development" OFF) +if(NOT GLM_DEVELOPMENT_MODE) + message(FATAL_ERROR "GLM is a header only library, no need to build it") +endif() From 5b2e2e22857ee5c56c30bcd8cca37d600c4615f5 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 4 Feb 2011 10:57:03 +0000 Subject: [PATCH 7/8] Added multiplication operator --- glm/gtc/quaternion.hpp | 5 +++++ glm/gtc/quaternion.inl | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index f3c6fbc4..c70b1cde 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -76,6 +76,11 @@ namespace glm detail::tquat operator- ( detail::tquat const & q); + template + detail::tquat operator* ( + detail::tquat const & q, + detail::tquat const & p); + template detail::tvec3 operator* ( detail::tquat const & q, diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index d0344d14..a445c182 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -156,6 +156,20 @@ namespace detail{ return detail::tquat(-q.w, -q.x, -q.y, -q.z); } + template + inline detail::tquat operator* + ( + detail::tquat const & q, + detail::tquat const & p + ) + { + return detail::tquat( + q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z, + q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y, + q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z, + q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x); + } + // Transformation template inline detail::tvec3 operator* From 7832018cbb8ab576fe6410bff000462615eb51c3 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 4 Feb 2011 17:03:17 +0000 Subject: [PATCH 8/8] Deprecated cross function between quaternions --- glm/gtc/quaternion.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index d0ca1f8b..34da0401 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -146,7 +146,7 @@ namespace glm //! Returns the cross product of q1 and q2. //! From GLM_GTC_quaternion extension. template - detail::tquat cross( + GLM_DEPRECATED detail::tquat cross( detail::tquat const & q1, detail::tquat const & q2);