Browse Source

Fixed build

Christophe Riccio 9 years ago
parent
commit
7839b862e8
3 changed files with 8 additions and 8 deletions
  1. 2 2
      glm/gtc/packing.hpp
  2. 2 2
      glm/gtc/packing.inl
  3. 4 4
      test/gtc/gtc_packing.cpp

+ 2 - 2
glm/gtc/packing.hpp

@@ -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.

+ 2 - 2
glm/gtc/packing.inl

@@ -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");

+ 4 - 4
test/gtc/gtc_packing.cpp

@@ -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);
 	}