Fixed half precision implementation

This commit is contained in:
Christophe Riccio
2013-04-15 11:04:24 +02:00
parent c14e2d7fbc
commit 296e3d7007
14 changed files with 778 additions and 502 deletions

View File

@@ -42,12 +42,24 @@ static int test_vec()
return Error;
}
static int test_dvec()
{
int Error = 0;
Error += sizeof(glm::dvec2) == sizeof(glm::highp_dvec2) ? 0 : 1;
Error += sizeof(glm::dvec3) == sizeof(glm::highp_dvec3) ? 0 : 1;
Error += sizeof(glm::dvec4) == sizeof(glm::highp_dvec4) ? 0 : 1;
return Error;
}
int main()
{
int Error = 0;
Error += test_mat();
Error += test_vec();
Error += test_dvec();
return Error;
}

View File

@@ -210,8 +210,8 @@ int test_vec2_size()
Error += sizeof(glm::vec2) == sizeof(glm::mediump_vec2) ? 0 : 1;
Error += 8 == sizeof(glm::mediump_vec2) ? 0 : 1;
Error += sizeof(glm::dvec2) == sizeof(glm::highp_vec2) ? 0 : 1;
Error += 16 == sizeof(glm::highp_vec2) ? 0 : 1;
Error += sizeof(glm::dvec2) == sizeof(glm::highp_dvec2) ? 0 : 1;
Error += 16 == sizeof(glm::highp_dvec2) ? 0 : 1;
Error += glm::vec2().length() == 2 ? 0 : 1;
Error += glm::dvec2().length() == 2 ? 0 : 1;
@@ -223,7 +223,7 @@ int main()
int Error = 0;
Error += test_vec2_size();
Error += test_vec2_ctor();
Error += test_vec2_ctor();
Error += test_vec2_operators();
return Error;