Can't see values for vec or mat in the debugger #665

This commit is contained in:
Groove
2018-07-29 22:11:15 +02:00
parent d307d39019
commit 147d56d90c
8 changed files with 79 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ glmCreateTestGTC(core_force_explicit_ctor)
glmCreateTestGTC(core_force_inline)
glmCreateTestGTC(core_force_pure)
glmCreateTestGTC(core_force_unrestricted_gentype)
glmCreateTestGTC(core_force_xyzw_only)
glmCreateTestGTC(core_type_aligned)
glmCreateTestGTC(core_type_cast)
glmCreateTestGTC(core_type_ctor)

View File

@@ -0,0 +1,49 @@
#define GLM_FORCE_XYZW_ONLY
#include <glm/ext/vec1.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
int test_comp()
{
int Error = 0;
{
glm::ivec1 const A(1);
Error += A.x == 1 ? 0 : 1;
}
{
glm::ivec2 const A(1, 2);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
}
{
glm::ivec3 const A(1, 2, 3);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
Error += A.z == 3 ? 0 : 1;
}
{
glm::ivec4 const A(1, 2, 3, 4);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
Error += A.z == 3 ? 0 : 1;
Error += A.w == 4 ? 0 : 1;
}
return Error;
}
int main()
{
int Error = 0;
Error += test_comp();
return Error;
}