diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index 95f17717..31bcb775 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -205,16 +205,11 @@ namespace detail typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat3x2 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } + tmat2x3 m(a); os << io::cr() << '[' << m[0] << io::cr() - << ' ' << m[1] << io::cr() - << ' ' << m[2] << ']'; + << ' ' << m[1] << ']'; } return os; @@ -226,17 +221,11 @@ namespace detail typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat4x2 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } + tmat2x4 m(a); os << io::cr() << '[' << m[0] << io::cr() - << ' ' << m[1] << io::cr() - << ' ' << m[2] << io::cr() - << ' ' << m[3] << ']'; + << ' ' << m[1] << ']'; } return os; @@ -248,15 +237,12 @@ namespace detail typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat2x3 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } + tmat3x2 m(a); os << io::cr() << '[' << m[0] << io::cr() - << ' ' << m[1] << ']'; + << ' ' << m[1] << io::cr() + << ' ' << m[2] << ']'; } return os; @@ -289,11 +275,24 @@ namespace detail typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat4x3 m(a); + tmat3x4 m(a); - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } + os << io::cr() + << '[' << m[0] << io::cr() + << ' ' << m[1] << io::cr() + << ' ' << m[2] << ']'; + } + + return os; + } + + template + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x2 const& a) + { + typename std::basic_ostream::sentry const cerberus(os); + + if (cerberus) { + tmat4x2 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -305,42 +304,19 @@ namespace detail return os; } - template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x2 const& a) - { - typename std::basic_ostream::sentry const cerberus(os); - - if (cerberus) { - tmat2x4 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } - - os << io::cr() - << '[' << m[0] << io::cr() - << ' ' << m[1] << ']'; - } - - return os; - } - template GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x3 const& a) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat3x4 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } + tmat4x3 m(a); os << io::cr() << '[' << m[0] << io::cr() << ' ' << m[1] << io::cr() - << ' ' << m[2] << ']'; + << ' ' << m[2] << io::cr() + << ' ' << m[3] << ']'; } return os;