Added matrix integer extensions and tests
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
glmCreateTestGTC(ext_matrix_relational)
|
||||
glmCreateTestGTC(ext_matrix_transform)
|
||||
glmCreateTestGTC(ext_matrix_common)
|
||||
glmCreateTestGTC(ext_matrix_int2x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_int2x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_int2x4_sized)
|
||||
glmCreateTestGTC(ext_matrix_int3x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_int3x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_int3x4_sized)
|
||||
glmCreateTestGTC(ext_matrix_int4x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_int4x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_int4x4_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint2x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint2x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint2x4_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint3x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint3x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint3x4_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint4x2_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint4x3_sized)
|
||||
glmCreateTestGTC(ext_matrix_uint4x4_sized)
|
||||
glmCreateTestGTC(ext_quaternion_common)
|
||||
glmCreateTestGTC(ext_quaternion_exponential)
|
||||
glmCreateTestGTC(ext_quaternion_geometric)
|
||||
|
||||
28
test/ext/ext_matrix_int2x2_sized.cpp
Normal file
28
test/ext/ext_matrix_int2x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int2x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat2x2) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat2x2) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat2x2) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat2x2) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat2x2) < sizeof(glm::i16mat2x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat2x2) < sizeof(glm::i32mat2x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat2x2) < sizeof(glm::i64mat2x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int2x3_sized.cpp
Normal file
28
test/ext/ext_matrix_int2x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int2x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat2x3) == 6, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat2x3) == 12, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat2x3) == 24, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat2x3) == 48, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat2x3) < sizeof(glm::i16mat2x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat2x3) < sizeof(glm::i32mat2x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat2x3) < sizeof(glm::i64mat2x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int2x4_sized.cpp
Normal file
28
test/ext/ext_matrix_int2x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int2x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat2x4) == 8, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat2x4) == 16, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat2x4) == 32, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat2x4) == 64, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat2x4) < sizeof(glm::i16mat2x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat2x4) < sizeof(glm::i32mat2x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat2x4) < sizeof(glm::i64mat2x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int3x2_sized.cpp
Normal file
28
test/ext/ext_matrix_int3x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int3x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat3x2) == 6, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat3x2) == 12, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat3x2) == 24, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat3x2) == 48, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat3x2) < sizeof(glm::i16mat3x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat3x2) < sizeof(glm::i32mat3x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat3x2) < sizeof(glm::i64mat3x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int3x3_sized.cpp
Normal file
28
test/ext/ext_matrix_int3x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int3x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat3x3) == 9, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat3x3) == 18, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat3x3) == 36, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat3x3) == 72, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat3x3) < sizeof(glm::i16mat3x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat3x3) < sizeof(glm::i32mat3x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat3x3) < sizeof(glm::i64mat3x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int3x4_sized.cpp
Normal file
28
test/ext/ext_matrix_int3x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int3x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat3x4) == 12, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat3x4) == 24, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat3x4) == 48, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat3x4) == 96, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat3x4) < sizeof(glm::i16mat3x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat3x4) < sizeof(glm::i32mat3x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat3x4) < sizeof(glm::i64mat3x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int4x2_sized.cpp
Normal file
28
test/ext/ext_matrix_int4x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int4x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat4x2) == 8, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat4x2) == 16, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat4x2) == 32, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat4x2) == 64, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat4x2) < sizeof(glm::i16mat4x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat4x2) < sizeof(glm::i32mat4x2) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat4x2) < sizeof(glm::i64mat4x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int4x3_sized.cpp
Normal file
28
test/ext/ext_matrix_int4x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int4x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat4x3) == 12, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat4x3) == 24, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat4x3) == 48, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat4x3) == 96, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat4x3) < sizeof(glm::i16mat4x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat4x3) < sizeof(glm::i32mat4x3) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat4x3) < sizeof(glm::i64mat4x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_int4x4_sized.cpp
Normal file
28
test/ext/ext_matrix_int4x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_int4x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::i8mat4x4) == 16, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i16mat4x4) == 32, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32mat4x4) == 64, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64mat4x4) == 128, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::i8mat4x4) < sizeof(glm::i16mat4x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i16mat4x4) < sizeof(glm::i32mat4x4) ? 0 : 1;
|
||||
Error += sizeof(glm::i32mat4x4) < sizeof(glm::i64mat4x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint2x2_sized.cpp
Normal file
28
test/ext/ext_matrix_uint2x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint2x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat2x2) == 4, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat2x2) == 8, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat2x2) == 16, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat2x2) == 32, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat2x2) < sizeof(glm::u16mat2x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat2x2) < sizeof(glm::u32mat2x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat2x2) < sizeof(glm::u64mat2x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint2x3_sized.cpp
Normal file
28
test/ext/ext_matrix_uint2x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint2x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat2x3) == 6, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat2x3) == 12, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat2x3) == 24, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat2x3) == 48, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat2x3) < sizeof(glm::u16mat2x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat2x3) < sizeof(glm::u32mat2x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat2x3) < sizeof(glm::u64mat2x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint2x4_sized.cpp
Normal file
28
test/ext/ext_matrix_uint2x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint2x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat2x4) == 8, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat2x4) == 16, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat2x4) == 32, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat2x4) == 64, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat2x4) < sizeof(glm::u16mat2x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat2x4) < sizeof(glm::u32mat2x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat2x4) < sizeof(glm::u64mat2x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint3x2_sized.cpp
Normal file
28
test/ext/ext_matrix_uint3x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint3x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat3x2) == 6, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat3x2) == 12, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat3x2) == 24, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat3x2) == 48, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat3x2) < sizeof(glm::u16mat3x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat3x2) < sizeof(glm::u32mat3x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat3x2) < sizeof(glm::u64mat3x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint3x3_sized.cpp
Normal file
28
test/ext/ext_matrix_uint3x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint3x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat3x3) == 9, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat3x3) == 18, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat3x3) == 36, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat3x3) == 72, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat3x3) < sizeof(glm::u16mat3x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat3x3) < sizeof(glm::u32mat3x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat3x3) < sizeof(glm::u64mat3x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint3x4_sized.cpp
Normal file
28
test/ext/ext_matrix_uint3x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint3x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat3x4) == 12, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat3x4) == 24, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat3x4) == 48, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat3x4) == 96, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat3x4) < sizeof(glm::u16mat3x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat3x4) < sizeof(glm::u32mat3x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat3x4) < sizeof(glm::u64mat3x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint4x2_sized.cpp
Normal file
28
test/ext/ext_matrix_uint4x2_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint4x2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat4x2) == 8, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat4x2) == 16, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat4x2) == 32, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat4x2) == 64, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat4x2) < sizeof(glm::u16mat4x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat4x2) < sizeof(glm::u32mat4x2) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat4x2) < sizeof(glm::u64mat4x2) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint4x3_sized.cpp
Normal file
28
test/ext/ext_matrix_uint4x3_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint4x3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat4x3) == 12, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat4x3) == 24, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat4x3) == 48, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat4x3) == 96, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat4x3) < sizeof(glm::u16mat4x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat4x3) < sizeof(glm::u32mat4x3) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat4x3) < sizeof(glm::u64mat4x3) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
28
test/ext/ext_matrix_uint4x4_sized.cpp
Normal file
28
test/ext/ext_matrix_uint4x4_sized.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <glm/ext/matrix_uint4x4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::u8mat4x4) == 16, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u16mat4x4) == 32, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32mat4x4) == 64, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64mat4x4) == 128, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
static int test_comp()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::u8mat4x4) < sizeof(glm::u16mat4x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u16mat4x4) < sizeof(glm::u32mat4x4) ? 0 : 1;
|
||||
Error += sizeof(glm::u32mat4x4) < sizeof(glm::u64mat4x4) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_comp();
|
||||
|
||||
return Error;
|
||||
}
|
||||
Reference in New Issue
Block a user