|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|