From dd272c52ee146f9a057a2cec421d51d087d37c8e Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 13 Jan 2014 23:41:11 +0100 Subject: [PATCH] Fixed non power of two matrix products --- glm/detail/func_common.inl | 2 +- glm/detail/func_matrix.inl | 20 ++++++++++---------- glm/detail/intrinsic_matrix.inl | 2 +- glm/detail/type_mat2x3.inl | 2 +- glm/detail/type_mat2x4.inl | 2 +- glm/detail/type_mat3x2.inl | 2 +- glm/detail/type_mat3x4.inl | 2 +- glm/detail/type_mat4x2.inl | 2 +- glm/detail/type_mat4x3.inl | 2 +- glm/gtx/rotate_normalized_axis.inl | 4 ++-- readme.txt | 1 + test/core/core_func_matrix.cpp | 2 +- 12 files changed, 22 insertions(+), 21 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index e77f615c..b5279795 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -88,7 +88,7 @@ namespace detail { GLM_STATIC_ASSERT( std::numeric_limits::is_iec559 || - (std::numeric_limits::is_signed && std::numeric_limits::is_integer, "'sign' only accept signed inputs")); + (std::numeric_limits::is_signed && std::numeric_limits::is_integer), "'sign' only accept signed inputs"); genFIType result; if(x > genFIType(0)) diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index 3f2fb5ab..61bbfbf4 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -45,7 +45,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec2 const & c, detail::tvec2 const & r) { - detail::tmat2x2 m(detail::tmat2x2::null); + detail::tmat2x2 m(detail::tmat2x2::_null); m[0][0] = c[0] * r[0]; m[0][1] = c[1] * r[0]; m[1][0] = c[0] * r[1]; @@ -59,7 +59,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec3 const & c, detail::tvec3 const & r) { - detail::tmat3x3 m(detail::tmat3x3::null); + detail::tmat3x3 m(detail::tmat3x3::_null); for(length_t i(0); i < m.length(); ++i) m[i] = c * r[i]; return m; @@ -71,7 +71,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec4 const & c, detail::tvec4 const & r) { - detail::tmat4x4 m(detail::tmat4x4::null); + detail::tmat4x4 m(detail::tmat4x4::_null); for(length_t i(0); i < m.length(); ++i) m[i] = c * r[i]; return m; @@ -83,7 +83,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec3 const & c, detail::tvec2 const & r) { - detail::tmat2x3 m(detail::tmat2x3::null); + detail::tmat2x3 m(detail::tmat2x3::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[0][2] = c.z * r.x; @@ -99,7 +99,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec2 const & c, detail::tvec3 const & r) { - detail::tmat3x2 m(detail::tmat3x2::null); + detail::tmat3x2 m(detail::tmat3x2::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[1][0] = c.x * r.y; @@ -115,7 +115,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec4 const & c, detail::tvec2 const & r) { - detail::tmat2x4 m(detail::tmat2x4::null); + detail::tmat2x4 m(detail::tmat2x4::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[0][2] = c.z * r.x; @@ -133,7 +133,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec2 const & c, detail::tvec4 const & r) { - detail::tmat4x2 m(detail::tmat4x2::null); + detail::tmat4x2 m(detail::tmat4x2::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[1][0] = c.x * r.y; @@ -151,7 +151,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec4 const & c, detail::tvec3 const & r) { - detail::tmat3x4 m(detail::tmat3x4::null); + detail::tmat3x4 m(detail::tmat3x4::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[0][2] = c.z * r.x; @@ -173,7 +173,7 @@ namespace detail { GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait::type call(detail::tvec3 const & c, detail::tvec4 const & r) { - detail::tmat4x3 m(detail::tmat4x3::null); + detail::tmat4x3 m(detail::tmat4x3::_null); m[0][0] = c.x * r.x; m[0][1] = c.y * r.x; m[0][2] = c.z * r.x; @@ -429,7 +429,7 @@ namespace detail return result; } - template