diff options
Diffstat (limited to '3rdparty/glm/test/gtc/gtc_packing.cpp')
| -rw-r--r-- | 3rdparty/glm/test/gtc/gtc_packing.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/3rdparty/glm/test/gtc/gtc_packing.cpp b/3rdparty/glm/test/gtc/gtc_packing.cpp index 2e6e23dd1c8..7d3aca9d832 100644 --- a/3rdparty/glm/test/gtc/gtc_packing.cpp +++ b/3rdparty/glm/test/gtc/gtc_packing.cpp @@ -241,7 +241,7 @@ int test_F3x9_E1x5() Tests.push_back(glm::vec3(0.5f)); Tests.push_back(glm::vec3(0.9f)); - for(std::size_t i = 0; i < Tests.size(); ++i) + for (std::size_t i = 0; i < Tests.size(); ++i) { glm::uint32 p0 = glm::packF3x9_E1x5(Tests[i]); glm::vec3 v0 = glm::unpackF3x9_E1x5(p0); @@ -253,22 +253,6 @@ int test_F3x9_E1x5() return Error; } -int test_RGBM() -{ - int Error = 0; - - for(std::size_t i = 0; i < 1024; ++i) - { - glm::vec3 const Color(i); - glm::vec4 const RGBM = glm::packRGBM(Color); - glm::vec3 const Result= glm::unpackRGBM(RGBM); - - Error += glm::all(glm::epsilonEqual(Color, Result, 0.01f)) ? 0 : 1; - } - - return Error; -} - int test_packUnorm1x16() { int Error = 0; @@ -529,7 +513,7 @@ int test_packUnorm() { glm::vec2 B(A[i]); glm::u16vec2 C = glm::packUnorm<glm::uint16>(B); - glm::vec2 D = glm::unpackUnorm<float>(C); + glm::vec2 D = glm::unpackUnorm<glm::uint16, float>(C); Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1; assert(!Error); } @@ -550,7 +534,7 @@ int test_packSnorm() { glm::vec2 B(A[i]); glm::i16vec2 C = glm::packSnorm<glm::int16>(B); - glm::vec2 D = glm::unpackSnorm<float>(C); + glm::vec2 D = glm::unpackSnorm<glm::int16, float>(C); Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1; assert(!Error); } @@ -689,9 +673,8 @@ int main() Error += test_F2x11_1x10(); Error += test_F3x9_E1x5(); - Error += test_RGBM(); - Error += test_Unorm3x10_1x2(); Error += test_Snorm3x10_1x2(); + Error += test_Unorm3x10_1x2(); Error += test_I3x10_1x2(); Error += test_U3x10_1x2(); |
