Fixed build

This commit is contained in:
Christophe Riccio 2018-07-11 17:49:15 +02:00
parent 2098b073ff
commit 0f2e1fa493
49 changed files with 167 additions and 168 deletions

View File

@ -11,11 +11,11 @@
namespace glm{
namespace detail
{
template<length_t L, typename R, typename T, qualifier Q>
template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename R, typename T, qualifier Q>
struct functor1{};
template<typename R, typename T, qualifier Q>
struct functor1<1, R, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 1, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<1, R, Q> call(R (*Func) (T x), vec<1, T, Q> const& v)
{
@ -23,8 +23,8 @@ namespace detail
}
};
template<typename R, typename T, qualifier Q>
struct functor1<2, R, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 2, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q> const& v)
{
@ -32,8 +32,8 @@ namespace detail
}
};
template<typename R, typename T, qualifier Q>
struct functor1<3, R, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 3, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<3, R, Q> call(R (*Func) (T x), vec<3, T, Q> const& v)
{
@ -41,8 +41,8 @@ namespace detail
}
};
template<typename R, typename T, qualifier Q>
struct functor1<4, R, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 4, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q> const& v)
{
@ -50,11 +50,11 @@ namespace detail
}
};
template<length_t L, typename T, qualifier Q>
template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename T, qualifier Q>
struct functor2{};
template<typename T, qualifier Q>
struct functor2<1, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2<vec, 1, T, Q>
{
GLM_FUNC_QUALIFIER static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q> const& a, vec<1, T, Q> const& b)
{
@ -62,8 +62,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2<2, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2<vec, 2, T, Q>
{
GLM_FUNC_QUALIFIER static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q> const& a, vec<2, T, Q> const& b)
{
@ -71,8 +71,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2<3, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2<vec, 3, T, Q>
{
GLM_FUNC_QUALIFIER static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q> const& a, vec<3, T, Q> const& b)
{
@ -80,8 +80,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2<4, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2<vec, 4, T, Q>
{
GLM_FUNC_QUALIFIER static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q> const& a, vec<4, T, Q> const& b)
{
@ -89,11 +89,11 @@ namespace detail
}
};
template<length_t L, typename T, qualifier Q>
template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename T, qualifier Q>
struct functor2_vec_sca{};
template<typename T, qualifier Q>
struct functor2_vec_sca<1, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2_vec_sca<vec, 1, T, Q>
{
GLM_FUNC_QUALIFIER static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q> const& a, T b)
{
@ -101,8 +101,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2_vec_sca<2, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2_vec_sca<vec, 2, T, Q>
{
GLM_FUNC_QUALIFIER static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q> const& a, T b)
{
@ -110,8 +110,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2_vec_sca<3, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2_vec_sca<vec, 3, T, Q>
{
GLM_FUNC_QUALIFIER static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q> const& a, T b)
{
@ -119,8 +119,8 @@ namespace detail
}
};
template<typename T, qualifier Q>
struct functor2_vec_sca<4, T, Q>
template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
struct functor2_vec_sca<vec, 4, T, Q>
{
GLM_FUNC_QUALIFIER static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q> const& a, T b)
{

View File

@ -1,8 +1,6 @@
#pragma once
#include "setup.hpp"
#include "_vectorize.hpp"
#include <cstring>
#include <limits>
namespace glm{
@ -48,14 +46,5 @@ namespace detail
return x;
}
};
template<length_t L, typename T, qualifier Q, bool Aligned>
struct compute_abs_vector
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(abs, x);
}
};
}//namespace detail
}//namespace glm

View File

@ -2,7 +2,6 @@
#include "compute_common.hpp"
#include "setup.hpp"
#include <cstring>
#include <limits>
namespace glm{

View File

@ -67,6 +67,15 @@ namespace glm
namespace glm{
namespace detail
{
template<length_t L, typename T, qualifier Q, bool Aligned>
struct compute_abs_vector
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<vec, L, T, T, Q>::call(abs, x);
}
};
template<length_t L, typename T, typename U, qualifier Q, bool Aligned>
struct compute_mix_vector
{
@ -158,7 +167,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(std::floor, x);
return detail::functor1<vec, L, T, T, Q>::call(std::floor, x);
}
};
@ -167,7 +176,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(std::ceil, x);
return detail::functor1<vec, L, T, T, Q>::call(std::ceil, x);
}
};
@ -185,7 +194,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(trunc, x);
return detail::functor1<vec, L, T, T, Q>::call(trunc, x);
}
};
@ -194,7 +203,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(round, x);
return detail::functor1<vec, L, T, T, Q>::call(round, x);
}
};
@ -213,7 +222,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y)
{
return detail::functor2<L, T, Q>::call(min, x, y);
return detail::functor2<vec, L, T, Q>::call(min, x, y);
}
};
@ -222,7 +231,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y)
{
return detail::functor2<L, T, Q>::call(max, x, y);
return detail::functor2<vec, L, T, Q>::call(max, x, y);
}
};
@ -360,7 +369,7 @@ namespace detail
GLM_FUNC_QUALIFIER vec<L, T, Q> roundEven(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'roundEven' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(roundEven, x);
return detail::functor1<vec, L, T, T, Q>::call(roundEven, x);
}
// ceil

View File

@ -27,7 +27,7 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'log2' only accept floating-point inputs. Include <glm/gtc/integer.hpp> for integer inputs.");
return detail::functor1<L, T, T, Q>::call(log2, v);
return detail::functor1<vec, L, T, T, Q>::call(log2, v);
}
};
@ -36,7 +36,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(std::sqrt, x);
return detail::functor1<vec, L, T, T, Q>::call(std::sqrt, x);
}
};
@ -71,7 +71,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> pow(vec<L, T, Q> const& base, vec<L, T, Q> const& exponent)
{
return detail::functor2<L, T, Q>::call(pow, base, exponent);
return detail::functor2<vec, L, T, Q>::call(pow, base, exponent);
}
// exp
@ -79,7 +79,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> exp(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(exp, x);
return detail::functor1<vec, L, T, T, Q>::call(exp, x);
}
// log
@ -87,7 +87,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> log(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(log, x);
return detail::functor1<vec, L, T, T, Q>::call(log, x);
}
# if GLM_HAS_CXX11_STL
@ -106,7 +106,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> exp2(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(exp2, x);
return detail::functor1<vec, L, T, T, Q>::call(exp2, x);
}
// log2, ln2 = 0.69314718055994530941723212145818f

View File

@ -153,7 +153,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, int, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, int, T, Q>::call(compute_findMSB_32, x);
return detail::functor1<vec, L, int, T, Q>::call(compute_findMSB_32, x);
}
};
@ -171,7 +171,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, int, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<L, int, T, Q>::call(compute_findMSB_64, x);
return detail::functor1<vec, L, int, T, Q>::call(compute_findMSB_64, x);
}
};
# endif
@ -351,7 +351,7 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findLSB' only accept integer values");
return detail::functor1<L, int, T, Q>::call(findLSB, x);
return detail::functor1<vec, L, int, T, Q>::call(findLSB, x);
}
// findMSB

View File

@ -19,7 +19,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<L, T, Q> radians(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(radians, v);
return detail::functor1<vec, L, T, T, Q>::call(radians, v);
}
// degrees
@ -34,7 +34,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<L, T, Q> degrees(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(degrees, v);
return detail::functor1<vec, L, T, T, Q>::call(degrees, v);
}
// sin
@ -43,7 +43,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> sin(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(sin, v);
return detail::functor1<vec, L, T, T, Q>::call(sin, v);
}
// cos
@ -52,7 +52,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> cos(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(cos, v);
return detail::functor1<vec, L, T, T, Q>::call(cos, v);
}
// tan
@ -61,7 +61,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> tan(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(tan, v);
return detail::functor1<vec, L, T, T, Q>::call(tan, v);
}
// asin
@ -70,7 +70,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> asin(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(asin, v);
return detail::functor1<vec, L, T, T, Q>::call(asin, v);
}
// acos
@ -79,7 +79,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> acos(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(acos, v);
return detail::functor1<vec, L, T, T, Q>::call(acos, v);
}
// atan
@ -94,7 +94,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> atan(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
{
return detail::functor2<L, T, Q>::call(::std::atan2, a, b);
return detail::functor2<vec, L, T, Q>::call(::std::atan2, a, b);
}
using std::atan;
@ -102,7 +102,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> atan(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(atan, v);
return detail::functor1<vec, L, T, T, Q>::call(atan, v);
}
// sinh
@ -111,7 +111,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> sinh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(sinh, v);
return detail::functor1<vec, L, T, T, Q>::call(sinh, v);
}
// cosh
@ -120,7 +120,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> cosh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(cosh, v);
return detail::functor1<vec, L, T, T, Q>::call(cosh, v);
}
// tanh
@ -129,7 +129,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> tanh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(tanh, v);
return detail::functor1<vec, L, T, T, Q>::call(tanh, v);
}
// asinh
@ -148,7 +148,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> asinh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(asinh, v);
return detail::functor1<vec, L, T, T, Q>::call(asinh, v);
}
// acosh
@ -169,7 +169,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> acosh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(acosh, v);
return detail::functor1<vec, L, T, T, Q>::call(acosh, v);
}
// atanh
@ -190,7 +190,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> atanh(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(atanh, v);
return detail::functor1<vec, L, T, T, Q>::call(atanh, v);
}
}//namespace glm

View File

@ -15,7 +15,7 @@ namespace glm
packed_mediump, ///< Typed data is tightly packed in memory and operations are executed with medium precision in term of ULPs for higher performance
packed_lowp, ///< Typed data is tightly packed in memory and operations are executed with low precision in term of ULPs to maximize performance
# if GLM_HAS_ALIGNED_TYPE
# if GLM_HAS_ANONYMOUS_STRUCT
aligned_highp, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs
aligned_mediump, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs for higher performance
aligned_lowp, // ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs to maximize performance
@ -27,7 +27,7 @@ namespace glm
lowp = packed_lowp, ///< By default lowp qualifier is also packed
packed = packed_highp, ///< By default packed qualifier is also high precision
# if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED)
# if GLM_HAS_ANONYMOUS_STRUCT && defined(GLM_FORCE_ALIGNED)
defaultp = aligned_highp
# else
defaultp = highp
@ -47,23 +47,25 @@ namespace detail
static const bool value = false;
};
template<>
struct is_aligned<glm::aligned_lowp>
{
static const bool value = true;
};
# if GLM_HAS_ANONYMOUS_STRUCT
template<>
struct is_aligned<glm::aligned_lowp>
{
static const bool value = true;
};
template<>
struct is_aligned<glm::aligned_mediump>
{
static const bool value = true;
};
template<>
struct is_aligned<glm::aligned_mediump>
{
static const bool value = true;
};
template<>
struct is_aligned<glm::aligned_highp>
{
static const bool value = true;
};
template<>
struct is_aligned<glm::aligned_highp>
{
static const bool value = true;
};
# endif//GLM_HAS_ANONYMOUS_STRUCT
template<length_t L, typename T, bool is_aligned>
struct storage

View File

@ -296,7 +296,7 @@
# define GLM_HAS_UNRESTRICTED_UNIONS 1
#else
# define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)) || \
(GLM_COMPILER & GLM_COMPILER_VC) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
#endif
@ -722,7 +722,7 @@
///////////////////////////////////////////////////////////////////////////////////
#define GLM_HAS_ALIGNED_TYPE GLM_HAS_UNRESTRICTED_UNIONS
#define GLM_HAS_ANONYMOUS_STRUCT (GLM_LANG & GLM_LANG_CXXMS_FLAG)
///////////////////////////////////////////////////////////////////////////////////
// Length type: all length functions returns a length_t type.

View File

@ -30,7 +30,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -227,7 +227,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::col_type const& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 2, T, Q>::col_type const& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -227,7 +227,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<2, 3, T, Q>::col_type const& mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 3, T, Q>::col_type const& mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -229,7 +229,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<2, 4, T, Q>::col_type const& mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 4, T, Q>::col_type const& mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -246,7 +246,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::col_type const& mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 2, T, Q>::col_type const& mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -30,7 +30,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -248,11 +248,9 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 typename mat<3, 3, T, Q>::col_type const& mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 3, T, Q>::col_type const& mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) const
{
# if GLM_HAS_CONSTEXPR_CXX14
assert(i < this->length());
# endif
assert(i < this->length());
return this->value[i];
}

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -252,7 +252,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<3, 4, T, Q>::col_type const& mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 4, T, Q>::col_type const& mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 4; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -265,7 +265,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<4, 2, T, Q>::col_type const& mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 2, T, Q>::col_type const& mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -31,7 +31,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 4; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -265,7 +265,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<4, 3, T, Q>::col_type const& mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 3, T, Q>::col_type const& mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -30,7 +30,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
// -- Constructors --

View File

@ -296,7 +296,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::col_type const& mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 4, T, Q>::col_type const& mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View File

@ -66,7 +66,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 2;}
GLM_FUNC_DECL T& operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
// -- Implicit basic constructors --

View File

@ -1,6 +1,8 @@
/// @ref core
/// @file glm/core/type_tvec2.inl
#include "./compute_vector_relational.hpp"
namespace glm
{
// -- Implicit basic constructors --
@ -109,7 +111,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T const& vec<2, T, Q>::operator[](typename vec<2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<2, T, Q>::operator[](typename vec<2, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];

View File

@ -67,7 +67,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 3;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
// -- Implicit basic constructors --

View File

@ -173,7 +173,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T const& vec<3, T, Q>::operator[](typename vec<3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<3, T, Q>::operator[](typename vec<3, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];

View File

@ -29,7 +29,7 @@ namespace glm
# if GLM_HAS_ONLY_XYZW
T x, y, z, w;
# elif GLM_LANG & GLM_LANG_CXXMS_FLAG
# elif GLM_HAS_ANONYMOUS_STRUCT
union
{
struct { T x, y, z, w; };
@ -68,7 +68,7 @@ namespace glm
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
// -- Implicit basic constructors --

View File

@ -512,7 +512,7 @@ namespace detail
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T const& vec<4, T, Q>::operator[](typename vec<4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<4, T, Q>::operator[](typename vec<4, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
@ -1142,6 +1142,6 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE
#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
# include "type_vec4_simd.inl"
#endif

View File

@ -36,7 +36,7 @@
#include "./gtc/type_ptr.hpp"
#include "./gtc/ulp.hpp"
#include "./gtc/vec1.hpp"
#if GLM_HAS_ALIGNED_TYPE
#if GLM_HAS_ANONYMOUS_STRUCT
# include "./gtc/type_aligned.hpp"
#endif

View File

@ -235,7 +235,7 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'mask' accepts only integer values");
return detail::functor1<L, T, T, Q>::call(mask, v);
return detail::functor1<vec, L, T, T, Q>::call(mask, v);
}
template<typename genIType>

View File

@ -801,7 +801,7 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE
#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
# include "quaternion_simd.inl"
#endif

View File

@ -237,7 +237,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> gaussRand(vec<L, T, Q> const& Mean, vec<L, T, Q> const& Deviation)
{
return detail::functor2<L, T, Q>::call(gaussRand, Mean, Deviation);
return detail::functor2<vec, L, T, Q>::call(gaussRand, Mean, Deviation);
}
template<typename T>

View File

@ -18,7 +18,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> sec(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sec' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(sec, x);
return detail::functor1<vec, L, T, T, Q>::call(sec, x);
}
// csc
@ -33,7 +33,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> csc(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csc' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(csc, x);
return detail::functor1<vec, L, T, T, Q>::call(csc, x);
}
// cot
@ -50,7 +50,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> cot(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cot' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(cot, x);
return detail::functor1<vec, L, T, T, Q>::call(cot, x);
}
// asec
@ -65,7 +65,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> asec(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asec' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(asec, x);
return detail::functor1<vec, L, T, T, Q>::call(asec, x);
}
// acsc
@ -80,7 +80,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> acsc(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsc' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(acsc, x);
return detail::functor1<vec, L, T, T, Q>::call(acsc, x);
}
// acot
@ -97,7 +97,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> acot(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acot' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(acot, x);
return detail::functor1<vec, L, T, T, Q>::call(acot, x);
}
// sech
@ -112,7 +112,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> sech(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sech' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(sech, x);
return detail::functor1<vec, L, T, T, Q>::call(sech, x);
}
// csch
@ -127,7 +127,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> csch(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csch' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(csch, x);
return detail::functor1<vec, L, T, T, Q>::call(csch, x);
}
// coth
@ -142,7 +142,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> coth(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'coth' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(coth, x);
return detail::functor1<vec, L, T, T, Q>::call(coth, x);
}
// asech
@ -157,7 +157,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> asech(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asech' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(asech, x);
return detail::functor1<vec, L, T, T, Q>::call(asech, x);
}
// acsch
@ -172,7 +172,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> acsch(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsch' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(acsch, x);
return detail::functor1<vec, L, T, T, Q>::call(acsch, x);
}
// acoth
@ -187,6 +187,6 @@ namespace glm
GLM_FUNC_QUALIFIER vec<L, T, Q> acoth(vec<L, T, Q> const& x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acoth' only accept floating-point inputs");
return detail::functor1<L, T, T, Q>::call(acoth, x);
return detail::functor1<vec, L, T, T, Q>::call(acoth, x);
}
}//namespace glm

View File

@ -253,7 +253,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> floorPowerOfTwo(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(floorPowerOfTwo, v);
return detail::functor1<vec, L, T, T, Q>::call(floorPowerOfTwo, v);
}
///////////////////
@ -273,7 +273,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> roundPowerOfTwo(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(roundPowerOfTwo, v);
return detail::functor1<vec, L, T, T, Q>::call(roundPowerOfTwo, v);
}
////////////////
@ -309,7 +309,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> ceilMultiple(vec<L, T, Q> const& Source, vec<L, T, Q> const& Multiple)
{
return detail::functor2<L, T, Q>::call(ceilMultiple, Source, Multiple);
return detail::functor2<vec, L, T, Q>::call(ceilMultiple, Source, Multiple);
}
//////////////////////
@ -324,7 +324,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> floorMultiple(vec<L, T, Q> const& Source, vec<L, T, Q> const& Multiple)
{
return detail::functor2<L, T, Q>::call(floorMultiple, Source, Multiple);
return detail::functor2<vec, L, T, Q>::call(floorMultiple, Source, Multiple);
}
//////////////////////
@ -339,6 +339,6 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> roundMultiple(vec<L, T, Q> const& Source, vec<L, T, Q> const& Multiple)
{
return detail::functor2<L, T, Q>::call(roundMultiple, Source, Multiple);
return detail::functor2<vec, L, T, Q>::call(roundMultiple, Source, Multiple);
}
}//namespace glm

View File

@ -12,7 +12,7 @@
#pragma once
#if !GLM_HAS_ALIGNED_TYPE
#if !GLM_HAS_ANONYMOUS_STRUCT
# error "GLM: Aligned types are not supported on this platform"
#endif
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)

View File

@ -22,7 +22,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> highestBitValue(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(highestBitValue, v);
return detail::functor1<vec, L, T, T, Q>::call(highestBitValue, v);
}
///////////////////
@ -37,7 +37,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> lowestBitValue(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(lowestBitValue, v);
return detail::functor1<vec, L, T, T, Q>::call(lowestBitValue, v);
}
///////////////////
@ -52,7 +52,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(powerOfTwoAbove, v);
return detail::functor1<vec, L, T, T, Q>::call(powerOfTwoAbove, v);
}
///////////////////
@ -67,7 +67,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(powerOfTwoBelow, v);
return detail::functor1<vec, L, T, T, Q>::call(powerOfTwoBelow, v);
}
/////////////////////
@ -87,7 +87,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& v)
{
return detail::functor1<L, T, T, Q>::call(powerOfTwoNearest, v);
return detail::functor1<vec, L, T, T, Q>::call(powerOfTwoNearest, v);
}
}//namespace glm

View File

@ -13,7 +13,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
{
return detail::functor2<L, T, Q>::call(std::fmod, a, b);
return detail::functor2<vec, L, T, Q>::call(std::fmod, a, b);
}
};

View File

@ -158,13 +158,13 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, T b)
{
return detail::functor2<L, T, Q>::call(fmin, a, vec<L, T, Q>(b));
return detail::functor2<vec, L, T, Q>::call(fmin, a, vec<L, T, Q>(b));
}
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
{
return detail::functor2<L, T, Q>::call(fmin, a, b);
return detail::functor2<vec, L, T, Q>::call(fmin, a, b);
}
// fmax
@ -188,13 +188,13 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b)
{
return detail::functor2<L, T, Q>::call(fmax, a, vec<L, T, Q>(b));
return detail::functor2<vec, L, T, Q>::call(fmax, a, vec<L, T, Q>(b));
}
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
{
return detail::functor2<L, T, Q>::call(fmax, a, b);
return detail::functor2<vec, L, T, Q>::call(fmax, a, b);
}
// fclamp

View File

@ -84,7 +84,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastExp(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastExp, x);
return detail::functor1<vec, L, T, T, Q>::call(fastExp, x);
}
// fastLog
@ -106,7 +106,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastLog(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastLog, x);
return detail::functor1<vec, L, T, T, Q>::call(fastLog, x);
}
//fastExp2, ln2 = 0.69314718055994530941723212145818f
@ -119,7 +119,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastExp2(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastExp2, x);
return detail::functor1<vec, L, T, T, Q>::call(fastExp2, x);
}
// fastLog2, ln2 = 0.69314718055994530941723212145818f
@ -132,6 +132,6 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastLog2(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastLog2, x);
return detail::functor1<vec, L, T, T, Q>::call(fastLog2, x);
}
}//namespace glm

View File

@ -15,7 +15,7 @@ namespace glm
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastSqrt(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastSqrt, x);
return detail::functor1<vec, L, T, T, Q>::call(fastSqrt, x);
}
// fastInversesqrt

View File

@ -24,7 +24,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> cos_52s(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(cos_52s, x);
return detail::functor1<vec, L, T, T, Q>::call(cos_52s, x);
}
}//namespace detail
@ -38,7 +38,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> wrapAngle(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(wrapAngle, x);
return detail::functor1<vec, L, T, T, Q>::call(wrapAngle, x);
}
// cos
@ -60,7 +60,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastCos(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastCos, x);
return detail::functor1<vec, L, T, T, Q>::call(fastCos, x);
}
// sin
@ -73,7 +73,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastSin(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastSin, x);
return detail::functor1<vec, L, T, T, Q>::call(fastSin, x);
}
// tan
@ -86,7 +86,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastTan(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastTan, x);
return detail::functor1<vec, L, T, T, Q>::call(fastTan, x);
}
// asin
@ -99,7 +99,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastAsin(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastAsin, x);
return detail::functor1<vec, L, T, T, Q>::call(fastAsin, x);
}
// acos
@ -112,7 +112,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastAcos(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastAcos, x);
return detail::functor1<vec, L, T, T, Q>::call(fastAcos, x);
}
// atan
@ -126,7 +126,7 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastAtan(vec<L, T, Q> const& y, vec<L, T, Q> const& x)
{
return detail::functor2<L, T, Q>::call(fastAtan, y, x);
return detail::functor2<vec, L, T, Q>::call(fastAtan, y, x);
}
template<typename T>
@ -138,6 +138,6 @@ namespace detail
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> fastAtan(vec<L, T, Q> const& x)
{
return detail::functor1<L, T, T, Q>::call(fastAtan, x);
return detail::functor1<vec, L, T, T, Q>::call(fastAtan, x);
}
}//namespace glm

View File

@ -1,6 +1,6 @@
#include <glm/glm.hpp>
#if GLM_HAS_ALIGNED_TYPE
#if GLM_HAS_ANONYMOUS_STRUCT
struct vec2;
struct _swizzle

View File

@ -1,7 +1,7 @@
#define GLM_FORCE_MESSAGES
#include <glm/glm.hpp>
#if GLM_HAS_ALIGNED_TYPE
#if GLM_HAS_ANONYMOUS_STRUCT
#include <glm/gtc/type_aligned.hpp>
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
@ -143,4 +143,4 @@ int main()
return 0;
}
#endif//GLM_HAS_ALIGNED_TYPE
#endif//GLM_HAS_ANONYMOUS_STRUCT

View File

@ -18,7 +18,7 @@ namespace
case glm::highp: os << "uhi"; break;
case glm::mediump: os << "umd"; break;
case glm::lowp: os << "ulo"; break;
# if GLM_HAS_ALIGNED_TYPE
# if GLM_HAS_ANONYMOUS_STRUCT
case glm::aligned_highp: os << "ahi"; break;
case glm::aligned_mediump: os << "amd"; break;
case glm::aligned_lowp: os << "alo"; break;