diff --git a/doc/glm.docx b/doc/glm.docx index e53d367c..c0c55fef 100644 Binary files a/doc/glm.docx and b/doc/glm.docx differ diff --git a/doc/~$glm.docx b/doc/~$glm.docx new file mode 100644 index 00000000..db258f22 Binary files /dev/null and b/doc/~$glm.docx differ diff --git a/glm/detail/func_matrix.hpp b/glm/detail/func_matrix.hpp index f75d17bd..91bf374a 100644 --- a/glm/detail/func_matrix.hpp +++ b/glm/detail/func_matrix.hpp @@ -77,9 +77,11 @@ namespace glm /// @tparam matType Floating-point matrix types. /// /// @see GLSL transpose man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template class matType> - GLM_FUNC_DECL typename matType::transpose_type transpose(matType const & x); + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions +# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) + template class matType> + GLM_FUNC_DECL typename matType::transpose_type transpose(matType const & x); +# endif /// Return the determinant of a squared matrix. /// diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index 59cef57f..1d885336 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -40,8 +40,8 @@ #define GLM_GTX_io // Dependency: -#include "../glm.hpp" -#include "../gtx/quaternion.hpp" +#include "../detail/setup.hpp" +#include "../gtc/quaternion.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) # pragma message("GLM: GLM_GTX_io extension included") @@ -114,7 +114,6 @@ namespace glm namespace detail { - template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tquat const&); template @@ -141,15 +140,9 @@ namespace glm GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tmat4x3 const&); template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tmat4x4 const&); - - template - GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, - std::pair const, - tmat4x4 const> const&); - - }//namespace detail - - /// @} + + /// @} +}//namespace detail }//namespace glm #include "io.inl" diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index 31bcb775..82ef1204 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -7,6 +7,7 @@ // File : glm/gtx/inl.inl /////////////////////////////////////////////////////////////////////////////////////////////////// +#include "../matrix.hpp" // #include // boost::io::ios_all_saver #include // std::setfill<>, std::fixed, std::setprecision, std::right, // std::setw @@ -180,16 +181,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x2 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x2 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat2x2 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } os << io::cr() << '[' << m[0] << io::cr() @@ -200,12 +196,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x3 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x3 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat2x3 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -216,12 +211,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x4 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat2x4 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat2x4 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -232,12 +226,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x2 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x2 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat3x2 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -249,16 +242,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x3 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x3 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat3x3 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } os << io::cr() << '[' << m[0] << io::cr() @@ -270,12 +258,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x4 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat3x4 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat3x4 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -287,12 +274,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x2 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x2 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat4x2 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -305,12 +291,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x3 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x3 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat4x3 m(a); os << io::cr() << '[' << m[0] << io::cr() @@ -323,16 +308,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x4 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tmat4x4 const& m) { typename std::basic_ostream::sentry const cerberus(os); if (cerberus) { - tmat4x4 m(a); - - if (io::format_guard::row_major == io::order()) { - m = transpose(a); - } os << io::cr() << '[' << m[0] << io::cr() @@ -344,30 +324,5 @@ namespace detail return os; } - template - GLM_FUNC_QUALIFIER std::basic_ostream& - operator<<(std::basic_ostream& os, - std::pair const, tmat4x4 const> const& a) - { - typename std::basic_ostream::sentry const cerberus(os); - - if (cerberus) { - tmat4x4 ml(a.first); - tmat4x4 mr(a.second); - - if (io::format_guard::row_major == io::order()) { - ml = transpose(a.first); - mr = transpose(a.second); - } - - os << io::cr() - << '[' << ml[0] << " [" << mr[0] << io::cr() - << ' ' << ml[1] << " " << mr[1] << io::cr() - << ' ' << ml[2] << " " << mr[2] << io::cr() - << ' ' << ml[3] << "] " << mr[3] << ']'; - } - - return os; - } }//namespace detail }//namespace glm diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index 188a8350..de714ceb 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -23,7 +23,6 @@ namespace detail return std::string(); va_start(list, msg); - #if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8)) vsprintf_s(text, STRING_BUFFER, msg, list); #else// diff --git a/readme.txt b/readme.txt index 592ce3b9..30a5b16e 100644 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,7 @@ GLM 0.9.5.0: 2013-12-25 -------------------------------------------------------------------------------- - Added forward declarations (glm/fwd.hpp) for faster compilations - Added per feature headers +- Minimized GLM internal dependencies - Improved Intel Compiler detection - Added bitfieldInterleave and _mm_bit_interleave_si128 functions - Added GTX_scalar_relational @@ -53,8 +54,8 @@ GLM 0.9.5.0: 2013-12-25 - Fixed post increment and decrement operators - Fixed perspective with zNear == 0 (#71) - Removed l-value swizzle operators -- Clean up compiler detection code for unsupported compilers -- Uses C++ casts +- Cleaned up compiler detection code for unsupported compilers +- Replaced C cast by C++ casts - Fixed .length() that should return a int and not a size_t - Added GLM_FORCE_SIZE_T_LENGTH and glm::length_t - Removed unnecessary conversions @@ -73,7 +74,7 @@ GLM 0.9.5.0: 2013-12-25 - Fixed CUDA coverage for GTC extensions - Added GTX_io extension - Improved GLM messages enabled when defining GLM_MESSAGES -- Implementation detail _inverse is now private +- Hidden matrix _inverse function implementation detail into private section ================================================================================ GLM 0.9.4.6: 2013-09-20 diff --git a/test/gtx/gtx_simd_vec4.cpp b/test/gtx/gtx_simd_vec4.cpp index 8ce92371..0f733ef9 100644 --- a/test/gtx/gtx_simd_vec4.cpp +++ b/test/gtx/gtx_simd_vec4.cpp @@ -34,8 +34,6 @@ int main() glm::simdVec4 GNI(add0); - printf("%f\n", GNI.Data /* .m128_f32 */); - return 0; }