From 9f0fe305851508dd23fb90e23fe9919bd8a02888 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 21 Jun 2014 13:22:06 +0200 Subject: [PATCH] Fixed build --- glm/gtc/packing.inl | 4 ++-- test/gtc/gtc_packing.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 4f42970b..5250352d 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -145,7 +145,7 @@ namespace detail else if(glm::isinf(x)) return 0x1f << 6; - float Copy = reinterpret_cast(x); + uint Pack = reinterpret_cast(x); return float2packed11(Pack); } @@ -352,7 +352,7 @@ namespace detail return *Packed; } - GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 const & v) + GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v) { i16vec4* p = reinterpret_cast(const_cast(&v)); i16vec4 Unpack(*p); diff --git a/test/gtc/gtc_packing.cpp b/test/gtc/gtc_packing.cpp index 8acfb74f..ceec3dd2 100644 --- a/test/gtc/gtc_packing.cpp +++ b/test/gtc/gtc_packing.cpp @@ -100,7 +100,7 @@ int test_Half1x16() glm::uint32 p0 = glm::packHalf1x16(Tests[i]); float v0 = glm::unpackHalf1x16(p0); glm::uint32 p1 = glm::packHalf1x16(v0); - float v1 = glm::unpackHalf1x16(p0); + float v1 = glm::unpackHalf1x16(p1); Error += (v0 == v1) ? 0 : 1; } @@ -124,7 +124,7 @@ int test_Half4x16() glm::uint64 p0 = glm::packHalf4x16(Tests[i]); glm::vec4 v0 = glm::unpackHalf4x16(p0); glm::uint64 p1 = glm::packHalf4x16(v0); - glm::vec4 v1 = glm::unpackHalf4x16(p0); + glm::vec4 v1 = glm::unpackHalf4x16(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; } @@ -148,7 +148,7 @@ int test_I3x10_1x2() glm::uint32 p0 = glm::packI3x10_1x2(Tests[i]); glm::ivec4 v0 = glm::unpackI3x10_1x2(p0); glm::uint32 p1 = glm::packI3x10_1x2(v0); - glm::ivec4 v1 = glm::unpackI3x10_1x2(p0); + glm::ivec4 v1 = glm::unpackI3x10_1x2(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; } @@ -172,7 +172,7 @@ int test_U3x10_1x2() glm::uint32 p0 = glm::packU3x10_1x2(Tests[i]); glm::uvec4 v0 = glm::unpackU3x10_1x2(p0); glm::uint32 p1 = glm::packU3x10_1x2(v0); - glm::uvec4 v1 = glm::unpackU3x10_1x2(p0); + glm::uvec4 v1 = glm::unpackU3x10_1x2(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; } @@ -196,7 +196,7 @@ int test_Snorm3x10_1x2() glm::uint32 p0 = glm::packSnorm3x10_1x2(Tests[i]); glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0); glm::uint32 p1 = glm::packSnorm3x10_1x2(v0); - glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p0); + glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; } @@ -220,7 +220,7 @@ int test_Unorm3x10_1x2() glm::uint32 p0 = glm::packSnorm3x10_1x2(Tests[i]); glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0); glm::uint32 p1 = glm::packSnorm3x10_1x2(v0); - glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p0); + glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; } @@ -244,7 +244,7 @@ int test_F2x11_1x10() glm::uint32 p0 = glm::packF2x11_1x10(Tests[i]); glm::vec3 v0 = glm::unpackF2x11_1x10(p0); glm::uint32 p1 = glm::packF2x11_1x10(v0); - glm::vec3 v1 = glm::unpackF2x11_1x10(p0); + glm::vec3 v1 = glm::unpackF2x11_1x10(p1); Error += glm::all(glm::equal(v0, v1)) ? 0 : 1; }