Clean up integer precision
This commit is contained in:
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_int1_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_i8vec1) == 1, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_i8vec1) == 1, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_i8vec1) == 1, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i8vec1) == 1, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i16vec1) == 2, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i16vec1) == 2, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i16vec1) == 2, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i16vec1) == 2, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i32vec1) == 4, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i32vec1) == 4, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i32vec1) == 4, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32vec1) == 4, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i64vec1) == 8, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i64vec1) == 8, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i64vec1) == 8, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64vec1) == 8, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_i8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::i8vec1) == 1 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::i16vec1) == 2 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::i32vec1) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::i64vec1) == 8 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_int2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_i8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_i8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_i8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_i8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::i8vec2) == 2 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::i16vec2) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::i32vec2) == 8 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::i64vec2) == 16 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_int3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_i8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_i8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_i8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_i8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::i8vec3) == 3 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::i16vec3) == 6 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::i32vec3) == 12 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::i64vec3) == 24 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_int4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_i8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_i8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_i8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::i8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::i16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::i32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_i64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_i64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_i64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::i64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_i8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::i8vec4) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::i16vec4) == 8 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::i32vec4) == 16 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_i64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_i64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_i64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::i64vec4) == 32 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <glm/ext/vector_integer.hpp>
|
||||
#include <glm/ext/vector_int1.hpp>
|
||||
#include <glm/ext/vector_int1_precision.hpp>
|
||||
#include <glm/ext/vector_int1_sized.hpp>
|
||||
#include <glm/ext/vector_uint1.hpp>
|
||||
#include <glm/ext/vector_uint1_precision.hpp>
|
||||
#include <glm/ext/vector_uint1_sized.hpp>
|
||||
|
||||
template <typename genType>
|
||||
static int test_operators()
|
||||
@@ -153,54 +153,64 @@ int main()
|
||||
int Error = 0;
|
||||
|
||||
Error += test_operators<glm::ivec1>();
|
||||
Error += test_operators<glm::lowp_ivec1>();
|
||||
Error += test_operators<glm::mediump_ivec1>();
|
||||
Error += test_operators<glm::highp_ivec1>();
|
||||
Error += test_operators<glm::i8vec1>();
|
||||
Error += test_operators<glm::i16vec1>();
|
||||
Error += test_operators<glm::i32vec1>();
|
||||
Error += test_operators<glm::i64vec1>();
|
||||
|
||||
Error += test_ctor<glm::ivec1>();
|
||||
Error += test_ctor<glm::lowp_ivec1>();
|
||||
Error += test_ctor<glm::mediump_ivec1>();
|
||||
Error += test_ctor<glm::highp_ivec1>();
|
||||
Error += test_ctor<glm::i8vec1>();
|
||||
Error += test_ctor<glm::i16vec1>();
|
||||
Error += test_ctor<glm::i32vec1>();
|
||||
Error += test_ctor<glm::i64vec1>();
|
||||
|
||||
Error += test_size<glm::ivec1>();
|
||||
Error += test_size<glm::lowp_ivec1>();
|
||||
Error += test_size<glm::mediump_ivec1>();
|
||||
Error += test_size<glm::highp_ivec1>();
|
||||
Error += test_size<glm::i8vec1>();
|
||||
Error += test_size<glm::i16vec1>();
|
||||
Error += test_size<glm::i32vec1>();
|
||||
Error += test_size<glm::i64vec1>();
|
||||
|
||||
Error += test_relational<glm::ivec1>();
|
||||
Error += test_relational<glm::lowp_ivec1>();
|
||||
Error += test_relational<glm::mediump_ivec1>();
|
||||
Error += test_relational<glm::highp_ivec1>();
|
||||
Error += test_relational<glm::i8vec1>();
|
||||
Error += test_relational<glm::i16vec1>();
|
||||
Error += test_relational<glm::i32vec1>();
|
||||
Error += test_relational<glm::i64vec1>();
|
||||
|
||||
Error += test_constexpr<glm::ivec1>();
|
||||
Error += test_constexpr<glm::lowp_ivec1>();
|
||||
Error += test_constexpr<glm::mediump_ivec1>();
|
||||
Error += test_constexpr<glm::highp_ivec1>();
|
||||
Error += test_constexpr<glm::i8vec1>();
|
||||
Error += test_constexpr<glm::i16vec1>();
|
||||
Error += test_constexpr<glm::i32vec1>();
|
||||
Error += test_constexpr<glm::i64vec1>();
|
||||
|
||||
Error += test_operators<glm::uvec1>();
|
||||
Error += test_operators<glm::lowp_uvec1>();
|
||||
Error += test_operators<glm::mediump_uvec1>();
|
||||
Error += test_operators<glm::highp_uvec1>();
|
||||
Error += test_operators<glm::u8vec1>();
|
||||
Error += test_operators<glm::u16vec1>();
|
||||
Error += test_operators<glm::u32vec1>();
|
||||
Error += test_operators<glm::u64vec1>();
|
||||
|
||||
Error += test_ctor<glm::uvec1>();
|
||||
Error += test_ctor<glm::lowp_uvec1>();
|
||||
Error += test_ctor<glm::mediump_uvec1>();
|
||||
Error += test_ctor<glm::highp_uvec1>();
|
||||
Error += test_ctor<glm::u8vec1>();
|
||||
Error += test_ctor<glm::u16vec1>();
|
||||
Error += test_ctor<glm::u32vec1>();
|
||||
Error += test_ctor<glm::u64vec1>();
|
||||
|
||||
Error += test_size<glm::uvec1>();
|
||||
Error += test_size<glm::lowp_uvec1>();
|
||||
Error += test_size<glm::mediump_uvec1>();
|
||||
Error += test_size<glm::highp_uvec1>();
|
||||
Error += test_size<glm::u8vec1>();
|
||||
Error += test_size<glm::u16vec1>();
|
||||
Error += test_size<glm::u32vec1>();
|
||||
Error += test_size<glm::u64vec1>();
|
||||
|
||||
Error += test_relational<glm::uvec1>();
|
||||
Error += test_relational<glm::lowp_uvec1>();
|
||||
Error += test_relational<glm::mediump_uvec1>();
|
||||
Error += test_relational<glm::highp_uvec1>();
|
||||
Error += test_relational<glm::u8vec1>();
|
||||
Error += test_relational<glm::u16vec1>();
|
||||
Error += test_relational<glm::u32vec1>();
|
||||
Error += test_relational<glm::u64vec1>();
|
||||
|
||||
Error += test_constexpr<glm::uvec1>();
|
||||
Error += test_constexpr<glm::lowp_uvec1>();
|
||||
Error += test_constexpr<glm::mediump_uvec1>();
|
||||
Error += test_constexpr<glm::highp_uvec1>();
|
||||
Error += test_constexpr<glm::u8vec1>();
|
||||
Error += test_constexpr<glm::u16vec1>();
|
||||
Error += test_constexpr<glm::u32vec1>();
|
||||
Error += test_constexpr<glm::u64vec1>();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_uint1_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_u8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u8vec1) == 1 ? 0 : 1;
|
||||
Error += sizeof(glm::u8vec1) == 1 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u16vec1) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::u16vec1) == 2 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u32vec1) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::u32vec1) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u64vec1) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::u64vec1) == 8 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_uint2_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_u8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_u8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_u8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u8vec2) == 2, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u16vec2) == 4, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32vec2) == 8, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64vec2) == 16, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_u8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u8vec2) == 2 ? 0 : 1;
|
||||
Error += sizeof(glm::u8vec2) == 2 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u16vec2) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::u16vec2) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u32vec2) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::u32vec2) == 8 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u64vec2) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::u64vec2) == 16 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_uint3_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_u8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_u8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_u8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u8vec3) == 3, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u16vec3) == 6, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32vec3) == 12, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64vec3) == 24, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_u8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u8vec3) == 3 ? 0 : 1;
|
||||
Error += sizeof(glm::u8vec3) == 3 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u16vec3) == 6 ? 0 : 1;
|
||||
Error += sizeof(glm::u16vec3) == 6 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u32vec3) == 12 ? 0 : 1;
|
||||
Error += sizeof(glm::u32vec3) == 12 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u64vec3) == 24 ? 0 : 1;
|
||||
Error += sizeof(glm::u64vec3) == 24 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
#include <glm/ext/vector_uint4_sized.hpp>
|
||||
|
||||
#if GLM_HAS_STATIC_ASSERT
|
||||
static_assert(sizeof(glm::lowp_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::mediump_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::highp_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
static_assert(sizeof(glm::u8vec4) == 4, "int8 size isn't 1 byte on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
static_assert(sizeof(glm::u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
static_assert(sizeof(glm::u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
|
||||
|
||||
static_assert(sizeof(glm::lowp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::mediump_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::highp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
static_assert(sizeof(glm::u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
|
||||
#endif
|
||||
|
||||
@@ -26,24 +11,9 @@ static int test_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += sizeof(glm::lowp_u8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u8vec4) == 4 ? 0 : 1;
|
||||
Error += sizeof(glm::u8vec4) == 4 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u16vec4) == 8 ? 0 : 1;
|
||||
Error += sizeof(glm::u16vec4) == 8 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u32vec4) == 16 ? 0 : 1;
|
||||
Error += sizeof(glm::u32vec4) == 16 ? 0 : 1;
|
||||
|
||||
Error += sizeof(glm::lowp_u64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::mediump_u64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::highp_u64vec4) == 32 ? 0 : 1;
|
||||
Error += sizeof(glm::u64vec4) == 32 ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
|
||||
Reference in New Issue
Block a user