summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/glm/test/gtc/gtc_packing.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-02-25 14:11:44 +1100
committer Vas Crabb <vas@vastheman.com>2017-02-25 14:11:44 +1100
commitfeb7c5dc791e7273967f7b77f0aaf66c8fa4737a (patch)
tree574c156e9dcca6d9da2424c4c025a0b38d001dce /3rdparty/glm/test/gtc/gtc_packing.cpp
parent8530f35a98b9d89f2874fa47d395b4a55219d479 (diff)
Update GLM to tip of stable branch (0.9.8.5 pre-release) - fixes build with MacPorts clang
(nw) In future, could people please use stable branches when updating 3rd-party libraries, not unstable development snapshots? It will help with stability.
Diffstat (limited to '3rdparty/glm/test/gtc/gtc_packing.cpp')
-rw-r--r--3rdparty/glm/test/gtc/gtc_packing.cpp25
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();