mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Fixed build
This commit is contained in:
parent
2908ddfbaa
commit
7839b862e8
@ -522,7 +522,7 @@ namespace glm
|
||||
///
|
||||
/// @see gtc_packing
|
||||
/// @see vecType<L, intType, P> packUnorm(vecType<L, floatType, P> const & v)
|
||||
template<typename uintType, length_t L, typename floatType, precision P>
|
||||
template<typename floatType, length_t L, typename uintType, precision P>
|
||||
GLM_FUNC_DECL vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const & v);
|
||||
|
||||
/// Convert each component of the normalized floating-point vector into signed integer values.
|
||||
@ -536,7 +536,7 @@ namespace glm
|
||||
///
|
||||
/// @see gtc_packing
|
||||
/// @see vecType<L, intType, P> packSnorm(vecType<L, floatType, P> const & v)
|
||||
template<typename intType, length_t L, typename floatType, precision P>
|
||||
template<typename floatType, length_t L, typename intType, precision P>
|
||||
GLM_FUNC_DECL vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v);
|
||||
|
||||
/// Convert each component of the normalized floating-point vector into unsigned integer values.
|
||||
|
@ -676,7 +676,7 @@ namespace detail
|
||||
return vec<L, uintType, P>(round(clamp(v, static_cast<floatType>(0), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<uintType>::max())));
|
||||
}
|
||||
|
||||
template<typename uintType, length_t L, typename floatType, precision P>
|
||||
template<typename floatType, length_t L, typename uintType, precision P>
|
||||
GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const& v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type");
|
||||
@ -694,7 +694,7 @@ namespace detail
|
||||
return vec<L, intType, P>(round(clamp(v , static_cast<floatType>(-1), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<intType>::max())));
|
||||
}
|
||||
|
||||
template<typename intType, length_t L, typename floatType, precision P>
|
||||
template<typename floatType, length_t L, typename intType, precision P>
|
||||
GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<intType>::is_integer, "uintType must be an integer type");
|
||||
|
@ -528,8 +528,8 @@ int test_packUnorm()
|
||||
for(std::size_t i = 0; i < A.size(); ++i)
|
||||
{
|
||||
glm::vec2 B(A[i]);
|
||||
glm::u16vec2 C = glm::packUnorm<2, glm::uint16>(B);
|
||||
glm::vec2 D = glm::unpackUnorm<2, glm::uint16, float>(C);
|
||||
glm::u16vec2 C = glm::packUnorm<glm::uint16>(B);
|
||||
glm::vec2 D = glm::unpackUnorm<float>(C);
|
||||
Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
|
||||
assert(!Error);
|
||||
}
|
||||
@ -549,8 +549,8 @@ int test_packSnorm()
|
||||
for(std::size_t i = 0; i < A.size(); ++i)
|
||||
{
|
||||
glm::vec2 B(A[i]);
|
||||
glm::i16vec2 C = glm::packSnorm<2, glm::int16>(B);
|
||||
glm::vec2 D = glm::unpackSnorm<2, glm::int16, float>(C);
|
||||
glm::i16vec2 C = glm::packSnorm<glm::int16>(B);
|
||||
glm::vec2 D = glm::unpackSnorm<float>(C);
|
||||
Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
|
||||
assert(!Error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user