mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Added repro test for Conversion error with an aligned matrix #777
This commit is contained in:
parent
87ecf4a233
commit
97e189606f
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#if GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE
|
#if GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE
|
||||||
#include <glm/gtc/type_aligned.hpp>
|
#include <glm/gtc/type_aligned.hpp>
|
||||||
|
#include <glm/ext/vector_relational.hpp>
|
||||||
|
|
||||||
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
|
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
|
||||||
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_mediump>::value, "aligned_mediump is not aligned");
|
GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_mediump>::value, "aligned_mediump is not aligned");
|
||||||
@ -126,12 +127,32 @@ static int test_ctor()
|
|||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
using namespace glm;
|
||||||
|
|
||||||
|
typedef mat<4, 4, float, aligned> aligned_mat4;
|
||||||
|
|
||||||
|
static int test_aligned_mat4()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
aligned_mat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
|
||||||
|
aligned_mat4 t = transpose(m);
|
||||||
|
aligned_mat4 const expected = mat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15);
|
||||||
|
for (length_t l = 0; l < expected.length(); ++l)
|
||||||
|
Error += all(equal(t[l], expected[l], 0.0001f)) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += test_ctor();
|
Error += test_ctor();
|
||||||
Error += test_copy();
|
Error += test_copy();
|
||||||
|
// Error += test_aligned_mat4();
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user