diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index 8b30109e..effd2fb6 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -21,6 +21,7 @@ #include "../gtc/quaternion.hpp" #include "../gtx/dual_quaternion.hpp" #include +#include #ifndef GLM_ENABLE_EXPERIMENTAL # error "GLM: GLM_GTX_string_cast is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." @@ -41,8 +42,8 @@ namespace glm /// Create a string from a GLM vector or matrix typed variable. /// @see gtx_string_cast extension. - template - GLM_FUNC_DECL std::string to_string(matType const & x); + template + GLM_FUNC_DECL std::string to_string(genType const& x); /// @} }//namespace glm diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index 839265f7..e63a4132 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -130,7 +130,7 @@ namespace detail {}; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<1, bool, P> const & x) { @@ -140,7 +140,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<2, bool, P> const & x) { @@ -151,7 +151,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<3, bool, P> const & x) { @@ -163,7 +163,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<4, bool, P> const & x) { @@ -176,7 +176,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<1, T, P> const & x) { @@ -191,7 +191,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<2, T, P> const & x) { @@ -206,7 +206,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<3, T, P> const & x) { @@ -221,7 +221,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(vec<4, T, P> const & x) { @@ -237,7 +237,7 @@ namespace detail template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat2x2 const & x) { @@ -255,7 +255,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat2x3 const & x) { @@ -273,7 +273,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat2x4 const & x) { @@ -291,7 +291,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat3x2 const & x) { @@ -311,7 +311,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat3x3 const & x) { @@ -331,7 +331,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat3x4 const & x) { @@ -351,7 +351,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat4x2 const & x) { @@ -373,7 +373,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat4x3 const & x) { @@ -395,7 +395,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tmat4x4 const & x) { @@ -418,7 +418,7 @@ namespace detail template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tquat const & x) { @@ -433,7 +433,7 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string > { GLM_FUNC_QUALIFIER static std::string call(tdualquat const & x) { @@ -450,7 +450,7 @@ namespace detail }//namespace detail template -GLM_FUNC_QUALIFIER std::string to_string(matType const & x) +GLM_FUNC_QUALIFIER std::string to_string(matType const& x) { return detail::compute_to_string::call(x); } diff --git a/test/external/gli/type.hpp b/test/external/gli/type.hpp index 2afc7a7e..36bf8660 100644 --- a/test/external/gli/type.hpp +++ b/test/external/gli/type.hpp @@ -34,31 +34,31 @@ namespace gli using std::size_t; - typedef tvec1 extent1d; - typedef tvec2 extent2d; - typedef tvec3 extent3d; - typedef tvec4 extent4d; + typedef vec<1, int> extent1d; + typedef vec<2, int> extent2d; + typedef vec<3, int> extent3d; + typedef vec<4, int> extent4d; template - inline tvec4 make_vec4(tvec1 const & v) + inline vec<4, T, P> make_vec4(vec<1, T, P> const& v) { - return tvec4(v.x, static_cast(0), static_cast(0), static_cast(1)); + return vec<4, T, P>(v.x, static_cast(0), static_cast(0), static_cast(1)); } template - inline tvec4 make_vec4(tvec2 const & v) + inline vec<4, T, P> make_vec4(vec<2, T, P> const& v) { - return tvec4(v.x, v.y, static_cast(0), static_cast(1)); + return vec<4, T, P>(v.x, v.y, static_cast(0), static_cast(1)); } template - inline tvec4 make_vec4(tvec3 const & v) + inline vec<4, T, P> make_vec4(vec<3, T, P> const& v) { - return tvec4(v.x, v.y, v.z, static_cast(1)); + return vec<4, T, P>(v.x, v.y, v.z, static_cast(1)); } template - inline tvec4 make_vec4(tvec4 const & v) + inline vec<4, T, P> make_vec4(vec<4, T, P> const& v) { return v; }