Fixed build

This commit is contained in:
Christophe Riccio 2016-12-30 10:26:12 +01:00
parent f00d666e22
commit 1477d323d9
3 changed files with 34 additions and 33 deletions

View File

@ -21,6 +21,7 @@
#include "../gtc/quaternion.hpp" #include "../gtc/quaternion.hpp"
#include "../gtx/dual_quaternion.hpp" #include "../gtx/dual_quaternion.hpp"
#include <string> #include <string>
#include <cmath>
#ifndef GLM_ENABLE_EXPERIMENTAL #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." # 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. /// Create a string from a GLM vector or matrix typed variable.
/// @see gtx_string_cast extension. /// @see gtx_string_cast extension.
template <typename matType> template <typename genType>
GLM_FUNC_DECL std::string to_string(matType const & x); GLM_FUNC_DECL std::string to_string(genType const& x);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -34,31 +34,31 @@ namespace gli
using std::size_t; using std::size_t;
typedef tvec1<int> extent1d; typedef vec<1, int> extent1d;
typedef tvec2<int> extent2d; typedef vec<2, int> extent2d;
typedef tvec3<int> extent3d; typedef vec<3, int> extent3d;
typedef tvec4<int> extent4d; typedef vec<4, int> extent4d;
template <typename T, precision P> template <typename T, precision P>
inline tvec4<T, P> make_vec4(tvec1<T, P> const & v) inline vec<4, T, P> make_vec4(vec<1, T, P> const& v)
{ {
return tvec4<T, P>(v.x, static_cast<T>(0), static_cast<T>(0), static_cast<T>(1)); return vec<4, T, P>(v.x, static_cast<T>(0), static_cast<T>(0), static_cast<T>(1));
} }
template <typename T, precision P> template <typename T, precision P>
inline tvec4<T, P> make_vec4(tvec2<T, P> const & v) inline vec<4, T, P> make_vec4(vec<2, T, P> const& v)
{ {
return tvec4<T, P>(v.x, v.y, static_cast<T>(0), static_cast<T>(1)); return vec<4, T, P>(v.x, v.y, static_cast<T>(0), static_cast<T>(1));
} }
template <typename T, precision P> template <typename T, precision P>
inline tvec4<T, P> make_vec4(tvec3<T, P> const & v) inline vec<4, T, P> make_vec4(vec<3, T, P> const& v)
{ {
return tvec4<T, P>(v.x, v.y, v.z, static_cast<T>(1)); return vec<4, T, P>(v.x, v.y, v.z, static_cast<T>(1));
} }
template <typename T, precision P> template <typename T, precision P>
inline tvec4<T, P> make_vec4(tvec4<T, P> const & v) inline vec<4, T, P> make_vec4(vec<4, T, P> const& v)
{ {
return v; return v;
} }