From e05935c7bdb2f39cb000d7306c01288da0106c08 Mon Sep 17 00:00:00 2001 From: Sergey Alexandrov Date: Sun, 18 Oct 2015 17:41:19 +0200 Subject: [PATCH 1/9] Add const qualifier in extractEulerAngleXYZ() --- glm/gtx/euler_angles.hpp | 2 +- glm/gtx/euler_angles.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index e772bbf0..c1d5683d 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -161,7 +161,7 @@ namespace glm /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M /// @see gtx_euler_angles template - GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, + GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 const & M, T & t1, T & t2, T & t3); diff --git a/glm/gtx/euler_angles.inl b/glm/gtx/euler_angles.inl index 80b30dbe..0b417000 100644 --- a/glm/gtx/euler_angles.inl +++ b/glm/gtx/euler_angles.inl @@ -323,7 +323,7 @@ namespace glm } template - GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 & M, + GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4 const & M, T & t1, T & t2, T & t3) From 96b7850cab53688901aeae071f9d9ffb5f8de17c Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 20 Oct 2015 04:05:58 +0200 Subject: [PATCH 2/9] Fix unintentional backface culling in triangle intersect This also fixes #194. The backface culling is unintentional because it is not documented anywhere and we can't give the triangle a normal so just assume the general case. --- glm/gtx/intersect.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtx/intersect.inl b/glm/gtx/intersect.inl index 0c1cc935..ac99351d 100644 --- a/glm/gtx/intersect.inl +++ b/glm/gtx/intersect.inl @@ -49,7 +49,7 @@ namespace glm typename genType::value_type a = glm::dot(e1, p); typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - if(a < Epsilon) + if(a < Epsilon && a > -Epsilon) return false; typename genType::value_type f = typename genType::value_type(1.0f) / a; From e5b84bd4b407bd80c0808901cfe0043b714229f0 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 20 Oct 2015 04:11:53 +0200 Subject: [PATCH 3/9] Added changelog --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index f4d601fb..13a17b87 100644 --- a/readme.md +++ b/readme.md @@ -68,6 +68,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ##### Fixes: - Fixed GTX_extended_min_max filename typo #386 +- Fixed intersectRayTriangle to not do any unintentional backface culling #### [GLM 0.9.7.2](https://github.com/g-truc/glm/tree/0.9.7) - 2015-XX-XX ##### Fixes: From a59aaea29d942db562995682da7e50b0477167fe Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Thu, 22 Oct 2015 14:14:27 +0000 Subject: [PATCH 4/9] test: Don't use 'Error:' or 'error:' in test output This is parsed by msbuild when using Visual Studio project files, and will automatically fail the build if encountered. This is a bug (or badly designed intentional behaviour) in msbuild. See http://blogs.msdn.com/b/dsvc/archive/2012/02/29/output-from-exec-task-resulting-in-build-failure.aspx for further details. --- test/gtx/gtx_integer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gtx/gtx_integer.cpp b/test/gtx/gtx_integer.cpp index 01738163..dcbbb692 100644 --- a/test/gtx/gtx_integer.cpp +++ b/test/gtx/gtx_integer.cpp @@ -63,10 +63,10 @@ int test_log2() Error += glm::abs(double(A) - B) <= 24 ? 0 : 1; assert(!Error); - printf("Log2(%d) Error: %d, %d\n", 1 << i, A, B); + printf("Log2(%d) error A=%d, B=%d\n", 1 << i, A, B); } - printf("log2 error: %d\n", Error); + printf("log2 error=%d\n", Error); return Error; } From a75e38fb40d50f4e519e97fb9ec12b78f4781afb Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Oct 2015 15:58:43 +0200 Subject: [PATCH 5/9] Remove old commented code --- glm/gtx/intersect.inl | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/glm/gtx/intersect.inl b/glm/gtx/intersect.inl index ac99351d..6b94d5bc 100644 --- a/glm/gtx/intersect.inl +++ b/glm/gtx/intersect.inl @@ -73,43 +73,6 @@ namespace glm return baryPosition.z >= typename genType::value_type(0.0f); } - //template - //GLM_FUNC_QUALIFIER bool intersectRayTriangle - //( - // genType const & orig, genType const & dir, - // genType const & vert0, genType const & vert1, genType const & vert2, - // genType & position - //) - //{ - // typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - // - // genType edge1 = vert1 - vert0; - // genType edge2 = vert2 - vert0; - // - // genType pvec = cross(dir, edge2); - // - // float det = dot(edge1, pvec); - // if(det < Epsilon) - // return false; - // - // genType tvec = orig - vert0; - // - // position.y = dot(tvec, pvec); - // if (position.y < typename genType::value_type(0) || position.y > det) - // return typename genType::value_type(0); - // - // genType qvec = cross(tvec, edge1); - // - // position.z = dot(dir, qvec); - // if (position.z < typename genType::value_type(0) || position.y + position.z > det) - // return typename genType::value_type(0); - // - // position.x = dot(edge2, qvec); - // position *= typename genType::value_type(1) / det; - // - // return typename genType::value_type(1); - //} - template GLM_FUNC_QUALIFIER bool intersectLineTriangle ( From f66c5ef004dc7fca21d85cf72321ba8f4a33c146 Mon Sep 17 00:00:00 2001 From: Laurie Date: Sat, 7 Nov 2015 09:08:37 +0000 Subject: [PATCH 6/9] Fixed build by adding missing scope --- glm/detail/func_trigonometric.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/detail/func_trigonometric.inl b/glm/detail/func_trigonometric.inl index f723de47..62861a68 100644 --- a/glm/detail/func_trigonometric.inl +++ b/glm/detail/func_trigonometric.inl @@ -123,7 +123,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType atan(vecType const & a, vecType const & b) { - return detail::functor2::call(atan2, a, b); + return detail::functor2::call(::std::atan2, a, b); } using std::atan; From 8200f815bf89ed5c3ae739fb60981a4488383df5 Mon Sep 17 00:00:00 2001 From: Erik Sejersen Date: Tue, 17 Nov 2015 14:52:50 +0100 Subject: [PATCH 7/9] Added left and right handedness to more projection functions and added a define for glClipControl GL_ZERO_TO_ONE --- glm/gtc/matrix_transform.hpp | 146 ++++++++++++++++++++++---- glm/gtc/matrix_transform.inl | 196 ++++++++++++++++++++++++++++++++--- 2 files changed, 304 insertions(+), 38 deletions(-) diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index b9f8098c..ebaf5e1f 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -116,14 +116,14 @@ namespace glm tmat4x4 const & m, tvec3 const & v); - /// Creates a matrix for an orthographic parallel viewing volume. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top - /// @param zNear - /// @param zFar + /// Creates a matrix for an orthographic parallel viewing volume, using the default handedness. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param zNear + /// @param zFar /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) @@ -136,12 +136,52 @@ namespace glm T zNear, T zFar); + /// Creates a matrix for an orthographic parallel viewing volume, using left-handedness. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param zNear + /// @param zFar + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + template + GLM_FUNC_DECL tmat4x4 orthoLH( + T left, + T right, + T bottom, + T top, + T zNear, + T zFar); + + /// Creates a matrix for an orthographic parallel viewing volume, using right-handedness. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param zNear + /// @param zFar + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + template + GLM_FUNC_DECL tmat4x4 orthoRH( + T left, + T right, + T bottom, + T top, + T zNear, + T zFar); + /// Creates a matrix for projecting two-dimensional coordinates onto the screen. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top + /// + /// @param left + /// @param right + /// @param bottom + /// @param top /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) @@ -152,14 +192,14 @@ namespace glm T bottom, T top); - /// Creates a frustum matrix. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top - /// @param near - /// @param far + /// Creates a frustum matrix with default handedness. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param near + /// @param far /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform template @@ -171,6 +211,44 @@ namespace glm T near, T far); + /// Creates a left handed frustum matrix. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + GLM_FUNC_DECL tmat4x4 frustumLH( + T left, + T right, + T bottom, + T top, + T near, + T far); + + /// Creates a right handed frustum matrix. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + GLM_FUNC_DECL tmat4x4 frustumRH( + T left, + T right, + T bottom, + T top, + T near, + T far); + /// Creates a matrix for a symetric perspective-view frustum based on the default handedness. /// /// @param fovy Specifies the field of view angle in the y direction. Expressed in radians. @@ -267,8 +345,8 @@ namespace glm T near, T far); - /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite. - /// + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite with default handedness. + /// /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive). @@ -278,6 +356,28 @@ namespace glm GLM_FUNC_DECL tmat4x4 infinitePerspective( T fovy, T aspect, T near); + /// Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite. + /// + /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. + /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). + /// @param near Specifies the distance from the viewer to the near clipping plane (always positive). + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + GLM_FUNC_DECL tmat4x4 infinitePerspectiveLH( + T fovy, T aspect, T near); + + /// Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite. + /// + /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. + /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). + /// @param near Specifies the distance from the viewer to the near clipping plane (always positive). + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + GLM_FUNC_DECL tmat4x4 infinitePerspectiveRH( + T fovy, T aspect, T near); + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. /// /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index d60494e3..7e2c05bc 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -157,14 +157,65 @@ namespace glm T zNear, T zFar ) + { + #ifdef GLM_LEFT_HANDED + return orthoLH(left, right, bottom, top, zNear, zFar); + #else + return orthoRH(left, right, bottom, top, zNear, zFar); + #endif + } + + template + GLM_FUNC_QUALIFIER tmat4x4 orthoLH + ( + T left, + T right, + T bottom, + T top, + T zNear, + T zFar + ) { tmat4x4 Result(1); Result[0][0] = static_cast(2) / (right - left); Result[1][1] = static_cast(2) / (top - bottom); - Result[2][2] = - static_cast(2) / (zFar - zNear); Result[3][0] = - (right + left) / (right - left); Result[3][1] = - (top + bottom) / (top - bottom); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = static_cast(1) / (zFar - zNear); + Result[3][2] = - zNear / (zFar - zNear); +#else + Result[2][2] = static_cast(2) / (zFar - zNear); Result[3][2] = - (zFar + zNear) / (zFar - zNear); +#endif + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 orthoRH + ( + T left, + T right, + T bottom, + T top, + T zNear, + T zFar + ) + { + tmat4x4 Result(1); + Result[0][0] = static_cast(2) / (right - left); + Result[1][1] = static_cast(2) / (top - bottom); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = - static_cast(1) / (zFar - zNear); + Result[3][2] = - zNear / (zFar - zNear); +#else + Result[2][2] = - static_cast(2) / (zFar - zNear); + Result[3][2] = - (zFar + zNear) / (zFar - zNear); +#endif return Result; } @@ -177,13 +228,13 @@ namespace glm T top ) { - tmat4x4 Result(1); - Result[0][0] = static_cast(2) / (right - left); - Result[1][1] = static_cast(2) / (top - bottom); - Result[2][2] = - static_cast(1); - Result[3][0] = - (right + left) / (right - left); - Result[3][1] = - (top + bottom) / (top - bottom); - return Result; + tmat4x4 Result(1); + Result[0][0] = static_cast(2) / (right - left); + Result[1][1] = static_cast(2) / (top - bottom); + Result[2][2] = - static_cast(1); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + return Result; } template @@ -196,15 +247,67 @@ namespace glm T nearVal, T farVal ) + { +#ifdef GLM_LEFT_HANDED + return frustumLH(left, right, bottom, top, nearVal, farVal); +#else + return frustumRH(left, right, bottom, top, nearVal, farVal); +#endif + } + + template + GLM_FUNC_QUALIFIER tmat4x4 frustumLH + ( + T left, + T right, + T bottom, + T top, + T nearVal, + T farVal + ) + { + tmat4x4 Result(0); + Result[0][0] = (static_cast(2) * nearVal) / (right - left); + Result[1][1] = (static_cast(2) * nearVal) / (top - bottom); + Result[2][0] = (right + left) / (right - left); + Result[2][1] = (top + bottom) / (top - bottom); + Result[2][3] = static_cast(1); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = farVal / (zFar - nearVal); + Result[3][2] = -(farVal * nearVal) / (zFar - nearVal); +#else + Result[2][2] = (farVal + nearVal) / (farVal - nearVal); + Result[3][2] = - (static_cast(2) * farVal * nearVal) / (farVal - nearVal); +#endif + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 frustumRH + ( + T left, + T right, + T bottom, + T top, + T nearVal, + T farVal + ) { tmat4x4 Result(0); Result[0][0] = (static_cast(2) * nearVal) / (right - left); Result[1][1] = (static_cast(2) * nearVal) / (top - bottom); Result[2][0] = (right + left) / (right - left); Result[2][1] = (top + bottom) / (top - bottom); - Result[2][2] = -(farVal + nearVal) / (farVal - nearVal); Result[2][3] = static_cast(-1); - Result[3][2] = -(static_cast(2) * farVal * nearVal) / (farVal - nearVal); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = farVal / (nearVal - farVal); + Result[3][2] = -(farVal * nearVal) / (farVal - nearVal); +#else + Result[2][2] = - (farVal + nearVal) / (farVal - nearVal); + Result[3][2] = - (static_cast(2) * farVal * nearVal) / (farVal - nearVal); +#endif return Result; } @@ -240,9 +343,15 @@ namespace glm tmat4x4 Result(static_cast(0)); Result[0][0] = static_cast(1) / (aspect * tanHalfFovy); Result[1][1] = static_cast(1) / (tanHalfFovy); - Result[2][2] = - (zFar + zNear) / (zFar - zNear); Result[2][3] = - static_cast(1); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = zFar / (zNear - zFar); + Result[3][2] = -(zFar * zNear) / (zFar - zNear); +#else + Result[2][2] = - (zFar + zNear) / (zFar - zNear); Result[3][2] = - (static_cast(2) * zFar * zNear) / (zFar - zNear); +#endif return Result; } @@ -262,9 +371,15 @@ namespace glm tmat4x4 Result(static_cast(0)); Result[0][0] = static_cast(1) / (aspect * tanHalfFovy); Result[1][1] = static_cast(1) / (tanHalfFovy); - Result[2][2] = (zFar + zNear) / (zFar - zNear); Result[2][3] = static_cast(1); - Result[3][2] = -(static_cast(2) * zFar * zNear) / (zFar - zNear); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = zFar / (zFar - zNear); + Result[3][2] = -(zFar * zNear) / (zFar - zNear); +#else + Result[2][2] = (zFar + zNear) / (zFar - zNear); + Result[3][2] = - (static_cast(2) * zFar * zNear) / (zFar - zNear); +#endif return Result; } @@ -306,9 +421,15 @@ namespace glm tmat4x4 Result(static_cast(0)); Result[0][0] = w; Result[1][1] = h; - Result[2][2] = - (zFar + zNear) / (zFar - zNear); Result[2][3] = - static_cast(1); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = zFar / (zNear - zFar); + Result[3][2] = -(zFar * zNear) / (zFar - zNear); +#else + Result[2][2] = - (zFar + zNear) / (zFar - zNear); Result[3][2] = - (static_cast(2) * zFar * zNear) / (zFar - zNear); +#endif return Result; } @@ -333,9 +454,16 @@ namespace glm tmat4x4 Result(static_cast(0)); Result[0][0] = w; Result[1][1] = h; - Result[2][2] = (zFar + zNear) / (zFar - zNear); Result[2][3] = static_cast(1); + +#ifdef GLM_DEPTH_ZERO_TO_ONE + Result[2][2] = zFar / (zFar - zNear); + Result[3][2] = -(zFar * zNear) / (zFar - zNear); +#else + Result[2][2] = (zFar + zNear) / (zFar - zNear); Result[3][2] = - (static_cast(2) * zFar * zNear) / (zFar - zNear); +#endif + return Result; } @@ -346,6 +474,21 @@ namespace glm T aspect, T zNear ) + { +#ifdef GLM_LEFT_HANDED + return infinitePerspectiveLH(fovy, aspect, zNear); +#else + return infinitePerspectiveRH(fovy, aspect, zNear); +#endif + } + + template + GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveRH + ( + T fovy, + T aspect, + T zNear + ) { T const range = tan(fovy / T(2)) * zNear; T const left = -range * aspect; @@ -362,6 +505,29 @@ namespace glm return Result; } + template + GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveLH + ( + T fovy, + T aspect, + T zNear + ) + { + T const range = tan(fovy / T(2)) * zNear; + T const left = -range * aspect; + T const right = range * aspect; + T const bottom = -range; + T const top = range; + + tmat4x4 Result(T(0)); + Result[0][0] = (T(2) * zNear) / (right - left); + Result[1][1] = (T(2) * zNear) / (top - bottom); + Result[2][2] = T(1); + Result[2][3] = T(1); + Result[3][2] = - T(2) * zNear; + return Result; + } + // Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf template GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective From 254ea0ee249fc0f5b0d252e43b5b3a58bc3616d2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 21 Nov 2015 11:27:09 +0100 Subject: [PATCH 8/9] Tentative fix for ICC errors #449 --- glm/detail/setup.hpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 9a044e1c..2478c3ef 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -579,25 +579,20 @@ # endif # elif GLM_COMPILER & GLM_COMPILER_INTEL # ifdef _MSC_EXTENSIONS +# define GLM_MSC_EXT GLM_LANG_CXXMS_FLAG +# else +# define GLM_MSC_EXT +# endif +# if __INTEL_CXX11_MODE__ # if __cplusplus >= 201402L # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG) # elif __cplusplus >= 201103L # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG) -# elif GLM_COMPILER >= GLM_COMPILER_INTEL13 -# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG) -# elif __cplusplus >= 199711L -# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG) # else -# define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG) +# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG) # endif # else -# if __cplusplus >= 201402L -# define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG) -# elif __cplusplus >= 201103L -# define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG) -# elif GLM_COMPILER >= GLM_COMPILER_INTEL13 -# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG) -# elif __cplusplus >= 199711L +# if __cplusplus >= 199711L # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG) # else # define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG) @@ -669,7 +664,7 @@ # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ - ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))) + ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))) #endif // N1720 From 16aba1a9373032339097d94d616968047f69fbf9 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Sun, 22 Nov 2015 06:48:23 +0100 Subject: [PATCH 9/9] Fix docs --- glm/gtx/vector_angle.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index 80288701..a05b988f 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -58,15 +58,15 @@ namespace glm /// @addtogroup gtx_vector_angle /// @{ - //! Returns the absolute angle between two vectors + //! Returns the absolute angle between two vectors. //! Parameters need to be normalized. - /// @see gtx_vector_angle extension + /// @see gtx_vector_angle extension. template GLM_FUNC_DECL typename vecType::value_type angle( vecType const & x, vecType const & y); - //! Returns the oriented angle between two 2d vectors + //! Returns the oriented angle between two 2d vectors. //! Parameters need to be normalized. /// @see gtx_vector_angle extension. template