diff --git a/glm/ext.hpp b/glm/ext.hpp index 3bc8db27..4b0e293d 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -92,24 +92,24 @@ #include "./ext/vector_float4_precision.hpp" #include "./ext/vector_int1.hpp" -#include "./ext/vector_int1_precision.hpp" +#include "./ext/vector_int1_sized.hpp" #include "./ext/vector_int2.hpp" -#include "./ext/vector_int2_precision.hpp" +#include "./ext/vector_int2_sized.hpp" #include "./ext/vector_int3.hpp" -#include "./ext/vector_int3_precision.hpp" +#include "./ext/vector_int3_sized.hpp" #include "./ext/vector_int4.hpp" -#include "./ext/vector_int4_precision.hpp" +#include "./ext/vector_int4_sized.hpp" #include "./ext/vector_relational.hpp" #include "./ext/vector_uint1.hpp" -#include "./ext/vector_uint1_precision.hpp" +#include "./ext/vector_uint1_sized.hpp" #include "./ext/vector_uint2.hpp" -#include "./ext/vector_uint2_precision.hpp" +#include "./ext/vector_uint2_sized.hpp" #include "./ext/vector_uint3.hpp" -#include "./ext/vector_uint3_precision.hpp" +#include "./ext/vector_uint3_sized.hpp" #include "./ext/vector_uint4.hpp" -#include "./ext/vector_uint4_precision.hpp" +#include "./ext/vector_uint4_sized.hpp" #include "./gtc/bitfield.hpp" #include "./gtc/color_space.hpp" diff --git a/glm/fwd.hpp b/glm/fwd.hpp index 474d44f7..1074a4ba 100644 --- a/glm/fwd.hpp +++ b/glm/fwd.hpp @@ -199,25 +199,25 @@ namespace glm // Vector int - typedef vec<1, i32, lowp> lowp_ivec1; - typedef vec<2, i32, lowp> lowp_ivec2; - typedef vec<3, i32, lowp> lowp_ivec3; - typedef vec<4, i32, lowp> lowp_ivec4; + typedef vec<1, int, lowp> lowp_ivec1; + typedef vec<2, int, lowp> lowp_ivec2; + typedef vec<3, int, lowp> lowp_ivec3; + typedef vec<4, int, lowp> lowp_ivec4; - typedef vec<1, i32, mediump> mediump_ivec1; - typedef vec<2, i32, mediump> mediump_ivec2; - typedef vec<3, i32, mediump> mediump_ivec3; - typedef vec<4, i32, mediump> mediump_ivec4; + typedef vec<1, int, mediump> mediump_ivec1; + typedef vec<2, int, mediump> mediump_ivec2; + typedef vec<3, int, mediump> mediump_ivec3; + typedef vec<4, int, mediump> mediump_ivec4; - typedef vec<1, i32, highp> highp_ivec1; - typedef vec<2, i32, highp> highp_ivec2; - typedef vec<3, i32, highp> highp_ivec3; - typedef vec<4, i32, highp> highp_ivec4; + typedef vec<1, int, highp> highp_ivec1; + typedef vec<2, int, highp> highp_ivec2; + typedef vec<3, int, highp> highp_ivec3; + typedef vec<4, int, highp> highp_ivec4; - typedef vec<1, i32, defaultp> ivec1; - typedef vec<2, i32, defaultp> ivec2; - typedef vec<3, i32, defaultp> ivec3; - typedef vec<4, i32, defaultp> ivec4; + typedef vec<1, int, defaultp> ivec1; + typedef vec<2, int, defaultp> ivec2; + typedef vec<3, int, defaultp> ivec3; + typedef vec<4, int, defaultp> ivec4; typedef vec<1, i8, lowp> lowp_i8vec1; typedef vec<2, i8, lowp> lowp_i8vec2; @@ -301,25 +301,25 @@ namespace glm // Vector uint - typedef vec<1, u32, lowp> lowp_uvec1; - typedef vec<2, u32, lowp> lowp_uvec2; - typedef vec<3, u32, lowp> lowp_uvec3; - typedef vec<4, u32, lowp> lowp_uvec4; + typedef vec<1, uint, lowp> lowp_uvec1; + typedef vec<2, uint, lowp> lowp_uvec2; + typedef vec<3, uint, lowp> lowp_uvec3; + typedef vec<4, uint, lowp> lowp_uvec4; - typedef vec<1, u32, mediump> mediump_uvec1; - typedef vec<2, u32, mediump> mediump_uvec2; - typedef vec<3, u32, mediump> mediump_uvec3; - typedef vec<4, u32, mediump> mediump_uvec4; + typedef vec<1, uint, mediump> mediump_uvec1; + typedef vec<2, uint, mediump> mediump_uvec2; + typedef vec<3, uint, mediump> mediump_uvec3; + typedef vec<4, uint, mediump> mediump_uvec4; - typedef vec<1, u32, highp> highp_uvec1; - typedef vec<2, u32, highp> highp_uvec2; - typedef vec<3, u32, highp> highp_uvec3; - typedef vec<4, u32, highp> highp_uvec4; + typedef vec<1, uint, highp> highp_uvec1; + typedef vec<2, uint, highp> highp_uvec2; + typedef vec<3, uint, highp> highp_uvec3; + typedef vec<4, uint, highp> highp_uvec4; - typedef vec<1, u32, defaultp> uvec1; - typedef vec<2, u32, defaultp> uvec2; - typedef vec<3, u32, defaultp> uvec3; - typedef vec<4, u32, defaultp> uvec4; + typedef vec<1, uint, defaultp> uvec1; + typedef vec<2, uint, defaultp> uvec2; + typedef vec<3, uint, defaultp> uvec3; + typedef vec<4, uint, defaultp> uvec4; typedef vec<1, u8, lowp> lowp_u8vec1; typedef vec<2, u8, lowp> lowp_u8vec2; diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index 25c141bb..775e2f48 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -1279,77 +1279,367 @@ namespace glm typedef highp_f64mat4x4 highp_f64mat4; + ///////////////////////////// + // Signed int vector types + + /// Low qualifier signed integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, int, lowp> lowp_ivec1; + + /// Low qualifier signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, int, lowp> lowp_ivec2; + + /// Low qualifier signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, int, lowp> lowp_ivec3; + + /// Low qualifier signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, int, lowp> lowp_ivec4; + + + /// Medium qualifier signed integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, int, mediump> mediump_ivec1; + + /// Medium qualifier signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, int, mediump> mediump_ivec2; + + /// Medium qualifier signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, int, mediump> mediump_ivec3; + + /// Medium qualifier signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, int, mediump> mediump_ivec4; + + + /// High qualifier signed integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, int, highp> highp_ivec1; + + /// High qualifier signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, int, highp> highp_ivec2; + + /// High qualifier signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, int, highp> highp_ivec3; + + /// High qualifier signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, int, highp> highp_ivec4; + + + /// Low qualifier 8 bit signed integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, i8, lowp> lowp_i8vec1; + + /// Low qualifier 8 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i8, lowp> lowp_i8vec2; + + /// Low qualifier 8 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i8, lowp> lowp_i8vec3; + + /// Low qualifier 8 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i8, lowp> lowp_i8vec4; + + + /// Medium qualifier 8 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i8, mediump> mediump_i8vec1; + + /// Medium qualifier 8 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i8, mediump> mediump_i8vec2; + + /// Medium qualifier 8 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i8, mediump> mediump_i8vec3; + + /// Medium qualifier 8 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i8, mediump> mediump_i8vec4; + + + /// High qualifier 8 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i8, highp> highp_i8vec1; + + /// High qualifier 8 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i8, highp> highp_i8vec2; + + /// High qualifier 8 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i8, highp> highp_i8vec3; + + /// High qualifier 8 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i8, highp> highp_i8vec4; + + + /// Low qualifier 16 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i16, lowp> lowp_i16vec1; + + /// Low qualifier 16 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i16, lowp> lowp_i16vec2; + + /// Low qualifier 16 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i16, lowp> lowp_i16vec3; + + /// Low qualifier 16 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i16, lowp> lowp_i16vec4; + + + /// Medium qualifier 16 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i16, mediump> mediump_i16vec1; + + /// Medium qualifier 16 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i16, mediump> mediump_i16vec2; + + /// Medium qualifier 16 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i16, mediump> mediump_i16vec3; + + /// Medium qualifier 16 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i16, mediump> mediump_i16vec4; + + + /// High qualifier 16 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i16, highp> highp_i16vec1; + + /// High qualifier 16 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i16, highp> highp_i16vec2; + + /// High qualifier 16 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i16, highp> highp_i16vec3; + + /// High qualifier 16 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i16, highp> highp_i16vec4; + + + /// Low qualifier 32 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i32, lowp> lowp_i32vec1; + + /// Low qualifier 32 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i32, lowp> lowp_i32vec2; + + /// Low qualifier 32 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i32, lowp> lowp_i32vec3; + + /// Low qualifier 32 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i32, lowp> lowp_i32vec4; + + + /// Medium qualifier 32 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i32, mediump> mediump_i32vec1; + + /// Medium qualifier 32 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i32, mediump> mediump_i32vec2; + + /// Medium qualifier 32 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i32, mediump> mediump_i32vec3; + + /// Medium qualifier 32 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i32, mediump> mediump_i32vec4; + + + /// High qualifier 32 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i32, highp> highp_i32vec1; + + /// High qualifier 32 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i32, highp> highp_i32vec2; + + /// High qualifier 32 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i32, highp> highp_i32vec3; + + /// High qualifier 32 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i32, highp> highp_i32vec4; + + + /// Low qualifier 64 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i64, lowp> lowp_i64vec1; + + /// Low qualifier 64 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i64, lowp> lowp_i64vec2; + + /// Low qualifier 64 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i64, lowp> lowp_i64vec3; + + /// Low qualifier 64 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i64, lowp> lowp_i64vec4; + + + /// Medium qualifier 64 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i64, mediump> mediump_i64vec1; + + /// Medium qualifier 64 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i64, mediump> mediump_i64vec2; + + /// Medium qualifier 64 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i64, mediump> mediump_i64vec3; + + /// Medium qualifier 64 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i64, mediump> mediump_i64vec4; + + + /// High qualifier 64 bit signed integer scalar type. + /// @see gtc_type_precision + typedef vec<1, i64, highp> highp_i64vec1; + + /// High qualifier 64 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, i64, highp> highp_i64vec2; + + /// High qualifier 64 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, i64, highp> highp_i64vec3; + + /// High qualifier 64 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, i64, highp> highp_i64vec4; + + + ///////////////////////////// + // Unsigned int vector types + + /// Low qualifier unsigned integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, uint, lowp> lowp_uvec1; + + /// Low qualifier unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, uint, lowp> lowp_uvec2; + + /// Low qualifier unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, uint, lowp> lowp_uvec3; + + /// Low qualifier unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, uint, lowp> lowp_uvec4; + + + /// Medium qualifier unsigned integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, uint, mediump> mediump_uvec1; + + /// Medium qualifier unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, uint, mediump> mediump_uvec2; + + /// Medium qualifier unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, uint, mediump> mediump_uvec3; + + /// Medium qualifier unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, uint, mediump> mediump_uvec4; + + + /// High qualifier unsigned integer vector of 1 component type. + /// @see gtc_type_precision + typedef vec<1, uint, highp> highp_uvec1; + + /// High qualifier unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef vec<2, uint, highp> highp_uvec2; + + /// High qualifier unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef vec<3, uint, highp> highp_uvec3; + + /// High qualifier unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef vec<4, uint, highp> highp_uvec4; /// Low qualifier 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u8, lowp> lowp_u8vec1; + typedef vec<1, u8, lowp> lowp_u8vec1; /// Low qualifier 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u8, lowp> lowp_u8vec2; + typedef vec<2, u8, lowp> lowp_u8vec2; /// Low qualifier 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u8, lowp> lowp_u8vec3; + typedef vec<3, u8, lowp> lowp_u8vec3; /// Low qualifier 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u8, lowp> lowp_u8vec4; + typedef vec<4, u8, lowp> lowp_u8vec4; /// Medium qualifier 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u8, mediump> mediump_u8vec1; + typedef vec<1, u8, mediump> mediump_u8vec1; /// Medium qualifier 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u8, mediump> mediump_u8vec2; + typedef vec<2, u8, mediump> mediump_u8vec2; /// Medium qualifier 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u8, mediump> mediump_u8vec3; + typedef vec<3, u8, mediump> mediump_u8vec3; /// Medium qualifier 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u8, mediump> mediump_u8vec4; + typedef vec<4, u8, mediump> mediump_u8vec4; /// High qualifier 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u8, highp> highp_u8vec1; + typedef vec<1, u8, highp> highp_u8vec1; /// High qualifier 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u8, highp> highp_u8vec2; + typedef vec<2, u8, highp> highp_u8vec2; /// High qualifier 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u8, highp> highp_u8vec3; + typedef vec<3, u8, highp> highp_u8vec3; /// High qualifier 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u8, highp> highp_u8vec4; - - - - /// Default qualifier 8 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef vec<1, u8, defaultp> u8vec1; - - /// Default qualifier 8 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef vec<2, u8, defaultp> u8vec2; - - /// Default qualifier 8 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef vec<3, u8, defaultp> u8vec3; - - /// Default qualifier 8 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef vec<4, u8, defaultp> u8vec4; - - + typedef vec<4, u8, highp> highp_u8vec4; /// Low qualifier 16 bit unsigned integer scalar type. @@ -1371,19 +1661,19 @@ namespace glm /// Medium qualifier 16 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u16, mediump> mediump_u16vec1; + typedef vec<1, u16, mediump> mediump_u16vec1; /// Medium qualifier 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u16, mediump> mediump_u16vec2; + typedef vec<2, u16, mediump> mediump_u16vec2; /// Medium qualifier 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u16, mediump> mediump_u16vec3; + typedef vec<3, u16, mediump> mediump_u16vec3; /// Medium qualifier 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u16, mediump> mediump_u16vec4; + typedef vec<4, u16, mediump> mediump_u16vec4; /// High qualifier 16 bit unsigned integer scalar type. @@ -1403,26 +1693,6 @@ namespace glm typedef vec<4, u16, highp> highp_u16vec4; - - - /// Default qualifier 16 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef vec<1, u16, defaultp> u16vec1; - - /// Default qualifier 16 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef vec<2, u16, defaultp> u16vec2; - - /// Default qualifier 16 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef vec<3, u16, defaultp> u16vec3; - - /// Default qualifier 16 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef vec<4, u16, defaultp> u16vec4; - - - /// Low qualifier 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef vec<1, u32, lowp> lowp_u32vec1; @@ -1442,19 +1712,19 @@ namespace glm /// Medium qualifier 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u32, mediump> mediump_u32vec1; + typedef vec<1, u32, mediump> mediump_u32vec1; /// Medium qualifier 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u32, mediump> mediump_u32vec2; + typedef vec<2, u32, mediump> mediump_u32vec2; /// Medium qualifier 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u32, mediump> mediump_u32vec3; + typedef vec<3, u32, mediump> mediump_u32vec3; /// Medium qualifier 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u32, mediump> mediump_u32vec4; + typedef vec<4, u32, mediump> mediump_u32vec4; /// High qualifier 32 bit unsigned integer scalar type. @@ -1474,26 +1744,6 @@ namespace glm typedef vec<4, u32, highp> highp_u32vec4; - - /// Default qualifier 32 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef vec<1, u32, defaultp> u32vec1; - - /// Default qualifier 32 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef vec<2, u32, defaultp> u32vec2; - - /// Default qualifier 32 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef vec<3, u32, defaultp> u32vec3; - - /// Default qualifier 32 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef vec<4, u32, defaultp> u32vec4; - - - - /// Low qualifier 64 bit unsigned integer scalar type. /// @see gtc_type_precision typedef vec<1, u64, lowp> lowp_u64vec1; @@ -1513,19 +1763,19 @@ namespace glm /// Medium qualifier 64 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef vec<1, u64, mediump> mediump_u64vec1; + typedef vec<1, u64, mediump> mediump_u64vec1; /// Medium qualifier 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef vec<2, u64, mediump> mediump_u64vec2; + typedef vec<2, u64, mediump> mediump_u64vec2; /// Medium qualifier 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef vec<3, u64, mediump> mediump_u64vec3; + typedef vec<3, u64, mediump> mediump_u64vec3; /// Medium qualifier 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef vec<4, u64, mediump> mediump_u64vec4; + typedef vec<4, u64, mediump> mediump_u64vec4; /// High qualifier 64 bit unsigned integer scalar type. @@ -1545,25 +1795,6 @@ namespace glm typedef vec<4, u64, highp> highp_u64vec4; - - - /// Default qualifier 64 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef vec<1, u64, defaultp> u64vec1; - - /// Default qualifier 64 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef vec<2, u64, defaultp> u64vec2; - - /// Default qualifier 64 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef vec<3, u64, defaultp> u64vec3; - - /// Default qualifier 64 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef vec<4, u64, defaultp> u64vec4; - - ////////////////////// // Float vector types diff --git a/glm/gtc/vec1.hpp b/glm/gtc/vec1.hpp index c20be874..63697a21 100644 --- a/glm/gtc/vec1.hpp +++ b/glm/gtc/vec1.hpp @@ -20,9 +20,9 @@ #include "../ext/vector_double1.hpp" #include "../ext/vector_double1_precision.hpp" #include "../ext/vector_int1.hpp" -#include "../ext/vector_int1_precision.hpp" +#include "../ext/vector_int1_sized.hpp" #include "../ext/vector_uint1.hpp" -#include "../ext/vector_uint1_precision.hpp" +#include "../ext/vector_uint1_sized.hpp" #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_vec1 extension included") diff --git a/glm/vec2.hpp b/glm/vec2.hpp index be768bf5..cd4e0708 100644 --- a/glm/vec2.hpp +++ b/glm/vec2.hpp @@ -9,6 +9,6 @@ #include "./ext/vector_double2.hpp" #include "./ext/vector_double2_precision.hpp" #include "./ext/vector_int2.hpp" -#include "./ext/vector_int2_precision.hpp" +#include "./ext/vector_int2_sized.hpp" #include "./ext/vector_uint2.hpp" -#include "./ext/vector_uint2_precision.hpp" +#include "./ext/vector_uint2_sized.hpp" diff --git a/glm/vec3.hpp b/glm/vec3.hpp index f5707223..f5a927db 100644 --- a/glm/vec3.hpp +++ b/glm/vec3.hpp @@ -9,6 +9,6 @@ #include "./ext/vector_double3.hpp" #include "./ext/vector_double3_precision.hpp" #include "./ext/vector_int3.hpp" -#include "./ext/vector_int3_precision.hpp" +#include "./ext/vector_int3_sized.hpp" #include "./ext/vector_uint3.hpp" -#include "./ext/vector_uint3_precision.hpp" +#include "./ext/vector_uint3_sized.hpp" diff --git a/glm/vec4.hpp b/glm/vec4.hpp index 91170207..c6ea9f1f 100644 --- a/glm/vec4.hpp +++ b/glm/vec4.hpp @@ -9,7 +9,7 @@ #include "./ext/vector_double4.hpp" #include "./ext/vector_double4_precision.hpp" #include "./ext/vector_int4.hpp" -#include "./ext/vector_int4_precision.hpp" +#include "./ext/vector_int4_sized.hpp" #include "./ext/vector_uint4.hpp" -#include "./ext/vector_uint4_precision.hpp" +#include "./ext/vector_uint4_sized.hpp" diff --git a/test/ext/ext_vector_int1_sized.cpp b/test/ext/ext_vector_int1_sized.cpp index e8cf05a8..c262f495 100644 --- a/test/ext/ext_vector_int1_sized.cpp +++ b/test/ext/ext_vector_int1_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_int2_sized.cpp b/test/ext/ext_vector_int2_sized.cpp index 93793213..f4ad8b6b 100644 --- a/test/ext/ext_vector_int2_sized.cpp +++ b/test/ext/ext_vector_int2_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_int3_sized.cpp b/test/ext/ext_vector_int3_sized.cpp index b988e245..c51bfe71 100644 --- a/test/ext/ext_vector_int3_sized.cpp +++ b/test/ext/ext_vector_int3_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_int4_sized.cpp b/test/ext/ext_vector_int4_sized.cpp index 62d39b0c..93fd9ed2 100644 --- a/test/ext/ext_vector_int4_sized.cpp +++ b/test/ext/ext_vector_int4_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_integer_sized.cpp b/test/ext/ext_vector_integer_sized.cpp index 4793646c..52b3f4ef 100644 --- a/test/ext/ext_vector_integer_sized.cpp +++ b/test/ext/ext_vector_integer_sized.cpp @@ -1,8 +1,8 @@ #include #include -#include +#include #include -#include +#include template static int test_operators() @@ -153,54 +153,64 @@ int main() int Error = 0; Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); + Error += test_operators(); + Error += test_operators(); + Error += test_operators(); + Error += test_operators(); Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); + Error += test_size(); + Error += test_size(); + Error += test_size(); + Error += test_size(); Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); + Error += test_relational(); + Error += test_relational(); + Error += test_relational(); + Error += test_relational(); Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); + Error += test_operators(); + Error += test_operators(); + Error += test_operators(); + Error += test_operators(); Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); + Error += test_ctor(); Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); + Error += test_size(); + Error += test_size(); + Error += test_size(); + Error += test_size(); Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); + Error += test_relational(); + Error += test_relational(); + Error += test_relational(); + Error += test_relational(); Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); + Error += test_constexpr(); return Error; } diff --git a/test/ext/ext_vector_uint1_sized.cpp b/test/ext/ext_vector_uint1_sized.cpp index d2efea42..f2e4624f 100644 --- a/test/ext/ext_vector_uint1_sized.cpp +++ b/test/ext/ext_vector_uint1_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_uint2_sized.cpp b/test/ext/ext_vector_uint2_sized.cpp index ea9ceb78..9c0977ee 100644 --- a/test/ext/ext_vector_uint2_sized.cpp +++ b/test/ext/ext_vector_uint2_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_uint3_sized.cpp b/test/ext/ext_vector_uint3_sized.cpp index 0969f9a3..4cc2e448 100644 --- a/test/ext/ext_vector_uint3_sized.cpp +++ b/test/ext/ext_vector_uint3_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/ext/ext_vector_uint4_sized.cpp b/test/ext/ext_vector_uint4_sized.cpp index b0792991..9e7ffe75 100644 --- a/test/ext/ext_vector_uint4_sized.cpp +++ b/test/ext/ext_vector_uint4_sized.cpp @@ -1,24 +1,9 @@ #include #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; diff --git a/test/gtc/gtc_type_precision.cpp b/test/gtc/gtc_type_precision.cpp index 2b43b127..77f06866 100644 --- a/test/gtc/gtc_type_precision.cpp +++ b/test/gtc/gtc_type_precision.cpp @@ -7,6 +7,144 @@ # include #endif +#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::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::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::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::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); + +static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); + + +static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); + +static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); + + +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::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::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::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::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::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::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::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::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); + +static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); + + +static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); + +static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); + + +static_assert(sizeof(glm::lowp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::mediump_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); +static_assert(sizeof(glm::highp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); + +static_assert(sizeof(glm::lowp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::mediump_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); +static_assert(sizeof(glm::highp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::mediump_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); +static_assert(sizeof(glm::highp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); + +static_assert(sizeof(glm::lowp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::mediump_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); +static_assert(sizeof(glm::highp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); + +#endif + static int test_scalar_size() { int Error = 0;