From 26e02fad688b840a1bdac8ba73144c9c70927d10 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 4 Jan 2014 12:46:47 +0100 Subject: [PATCH 1/2] Added initializer list for vectors --- test/core/core_type_vec2.cpp | 19 +++++++++++++++++++ test/core/core_type_vec3.cpp | 18 ++++++++++++++++++ test/core/core_type_vec4.cpp | 8 ++++++++ 3 files changed, 45 insertions(+) diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index bbfd2e5b..80bdb79c 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -9,6 +9,7 @@ #include #include +#include int test_vec2_operators() { @@ -199,6 +200,24 @@ int test_vec2_ctor() { int Error = 0; +#if(GLM_HAS_INITIALIZER_LISTS) + { + glm::vec2 a{ 0, 1 }; + std::vector v = { + {0, 1}, + {4, 5}, + {8, 9}}; + } + + { + glm::dvec2 a{ 0, 1 }; + std::vector v = { + {0, 1}, + {4, 5}, + {8, 9}}; + } +#endif + { glm::vec2 A = glm::vec2(2.0f); glm::vec2 B = glm::vec2(2.0f, 3.0f); diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index 7e8a1556..050cbbea 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -20,6 +20,24 @@ int test_vec3_ctor() { int Error = 0; +#if(GLM_HAS_INITIALIZER_LISTS) + { + glm::vec3 a{ 0, 1, 2 }; + std::vector v = { + {0, 1, 2}, + {4, 5, 6}, + {8, 9, 0}}; + } + + { + glm::dvec3 a{ 0, 1, 2 }; + std::vector v = { + {0, 1, 2}, + {4, 5, 6}, + {8, 9, 0}}; + } +#endif + { glm::vec3 A(1); glm::vec3 B(1, 1, 1); diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index f63b689b..88c7e24b 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -49,6 +49,14 @@ int test_vec4_ctor() {4, 5, 6, 7}, {8, 9, 0, 1}}; } + + { + glm::dvec4 a{ 0, 1, 2, 3 }; + std::vector v = { + {0, 1, 2, 3}, + {4, 5, 6, 7}, + {8, 9, 0, 1}}; + } #endif { From c6896064ef84ca09b7ac5d0cc77d7355cabcbda6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 4 Jan 2014 12:54:27 +0100 Subject: [PATCH 2/2] Fixed rotate function declaration for quat --- glm/gtc/quaternion.inl | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index c407a4ae..b772a3fe 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -617,7 +617,7 @@ namespace detail GLM_FUNC_QUALIFIER detail::tquat rotate ( detail::tquat const & q, - typename detail::tquat::value_type const & angle, + T const & angle, detail::tvec3 const & v ) { diff --git a/readme.txt b/readme.txt index 67be8123..b0d6355c 100644 --- a/readme.txt +++ b/readme.txt @@ -44,6 +44,7 @@ GLM 0.9.5.1: 2014-XX-XX - Added possible static_cast conversion of GLM types (#72) - Fixed error 'inverse' is not a member of 'glm' from glm::unProject (#146) - Fixed mismatch of GTC_packing declaration and definition prototypes +- Fixed rotate declaration for quat rotate function ================================================================================ GLM 0.9.5.0: 2013-12-25