mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a331771ea8
@ -105,7 +105,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static float call(vec<4, float, Q> const& v)
|
GLM_FUNC_QUALIFIER static float call(vec<4, float, Q> const& v)
|
||||||
{
|
{
|
||||||
return compute_dot<vec<4, float, Q>, float, true>::call(v, v);
|
return sqrt(compute_dot<vec<4, float, Q>, float, true>::call(v, v));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,9 +126,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
#if GLM_ARCH & GLM_ARCH_ARMV8_BIT
|
#if GLM_ARCH & GLM_ARCH_ARMV8_BIT
|
||||||
float32x4_t v = vmulq_f32(x.data, y.data);
|
float32x4_t v = vmulq_f32(x.data, y.data);
|
||||||
v = vpaddq_f32(v, v);
|
return vaddvq_f32(v);
|
||||||
v = vpaddq_f32(v, v);
|
|
||||||
return vgetq_lane_f32(v, 0);
|
|
||||||
#else // Armv7a with Neon
|
#else // Armv7a with Neon
|
||||||
float32x4_t p = vmulq_f32(x.data, y.data);
|
float32x4_t p = vmulq_f32(x.data, y.data);
|
||||||
float32x2_t v = vpadd_f32(vget_low_f32(p), vget_high_f32(p));
|
float32x2_t v = vpadd_f32(vget_low_f32(p), vget_high_f32(p));
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#define GLM_VERSION_MAJOR 0
|
#define GLM_VERSION_MAJOR 0
|
||||||
#define GLM_VERSION_MINOR 9
|
#define GLM_VERSION_MINOR 9
|
||||||
#define GLM_VERSION_PATCH 9
|
#define GLM_VERSION_PATCH 9
|
||||||
#define GLM_VERSION_REVISION 7
|
#define GLM_VERSION_REVISION 8
|
||||||
#define GLM_VERSION 997
|
#define GLM_VERSION 998
|
||||||
#define GLM_VERSION_MESSAGE "GLM: version 0.9.9.7"
|
#define GLM_VERSION_MESSAGE "GLM: version 0.9.9.8"
|
||||||
|
|
||||||
#define GLM_SETUP_INCLUDED GLM_VERSION
|
#define GLM_SETUP_INCLUDED GLM_VERSION
|
||||||
|
|
||||||
|
0
glm/ext/scalar_packing.hpp
Normal file
0
glm/ext/scalar_packing.hpp
Normal file
0
glm/ext/scalar_packing.inl
Normal file
0
glm/ext/scalar_packing.inl
Normal file
65
glm/ext/vector_int1_sized.hpp
Normal file
65
glm/ext/vector_int1_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_int1_sized
|
||||||
|
/// @file glm/ext/vector_int1_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_int1_sized GLM_EXT_vector_int1_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized signed integer vector types.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_int1_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_int_sized
|
||||||
|
/// @see ext_vector_uint1_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_int1.hpp"
|
||||||
|
#include "../ext/scalar_int_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_int1_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_int1_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int8, lowp> lowp_i8vec1;
|
||||||
|
/// Medium precision 8 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int8, mediump> mediump_i8vec1;
|
||||||
|
/// High precision 8 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int8, highp> highp_i8vec1;
|
||||||
|
/// 8 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int8, defaultp> i8vec1;
|
||||||
|
|
||||||
|
/// Low precision 16 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int16, lowp> lowp_i16vec1;
|
||||||
|
/// Medium precision 16 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int16, mediump> mediump_i16vec1;
|
||||||
|
/// High precision 16 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int16, highp> highp_i16vec1;
|
||||||
|
/// 16 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int16, defaultp> i16vec1;
|
||||||
|
|
||||||
|
/// Low precision 32 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int32, lowp> lowp_i32vec1;
|
||||||
|
/// Medium precision 32 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int32, mediump> mediump_i32vec1;
|
||||||
|
/// High precision 32 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int32, highp> highp_i32vec1;
|
||||||
|
/// 32 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int32, defaultp> i32vec1;
|
||||||
|
|
||||||
|
/// Low precision 64 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int64, lowp> lowp_i64vec1;
|
||||||
|
/// Medium precision 64 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int64, mediump> mediump_i64vec1;
|
||||||
|
/// High precision 64 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int64, highp> highp_i64vec1;
|
||||||
|
/// 64 bit signed integer vector of 1 component type.
|
||||||
|
typedef vec<1, int64, defaultp> i64vec1;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_int2_sized.hpp
Normal file
65
glm/ext/vector_int2_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_int2_sized
|
||||||
|
/// @file glm/ext/vector_int2_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_int2_sized GLM_EXT_vector_int2_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized signed integer vector of 2 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_int2_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_int_sized
|
||||||
|
/// @see ext_vector_uint2_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_int2.hpp"
|
||||||
|
#include "../ext/scalar_int_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_int2_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_int2_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int8, lowp> lowp_i8vec2;
|
||||||
|
/// Medium precision 8 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int8, mediump> mediump_i8vec2;
|
||||||
|
/// High precision 8 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int8, highp> highp_i8vec2;
|
||||||
|
/// 8 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int8, defaultp> i8vec2;
|
||||||
|
|
||||||
|
/// Low precision 16 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int16, lowp> lowp_i16vec2;
|
||||||
|
/// Medium precision 16 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int16, mediump> mediump_i16vec2;
|
||||||
|
/// High precision 16 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int16, highp> highp_i16vec2;
|
||||||
|
/// 16 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int16, defaultp> i16vec2;
|
||||||
|
|
||||||
|
/// Low precision 32 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int32, lowp> lowp_i32vec2;
|
||||||
|
/// Medium precision 32 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int32, mediump> mediump_i32vec2;
|
||||||
|
/// High precision 32 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int32, highp> highp_i32vec2;
|
||||||
|
/// 32 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int32, defaultp> i32vec2;
|
||||||
|
|
||||||
|
/// Low precision 64 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int64, lowp> lowp_i64vec2;
|
||||||
|
/// Medium precision 64 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int64, mediump> mediump_i64vec2;
|
||||||
|
/// High precision 64 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int64, highp> highp_i64vec2;
|
||||||
|
/// 64 bit signed integer vector of 2 components type.
|
||||||
|
typedef vec<2, int64, defaultp> i64vec2;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_int3_sized.hpp
Normal file
65
glm/ext/vector_int3_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_int3_sized
|
||||||
|
/// @file glm/ext/vector_int3_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_int3_sized GLM_EXT_vector_int3_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized signed integer vector of 3 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_int3_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_int_sized
|
||||||
|
/// @see ext_vector_uint3_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_int3.hpp"
|
||||||
|
#include "../ext/scalar_int_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_int3_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_int3_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int8, lowp> lowp_i8vec3;
|
||||||
|
/// Medium precision 8 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int8, mediump> mediump_i8vec3;
|
||||||
|
/// High precision 8 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int8, highp> highp_i8vec3;
|
||||||
|
/// 8 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int8, defaultp> i8vec3;
|
||||||
|
|
||||||
|
/// Low precision 16 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int16, lowp> lowp_i16vec3;
|
||||||
|
/// Medium precision 16 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int16, mediump> mediump_i16vec3;
|
||||||
|
/// High precision 16 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int16, highp> highp_i16vec3;
|
||||||
|
/// 16 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int16, defaultp> i16vec3;
|
||||||
|
|
||||||
|
/// Low precision 32 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int32, lowp> lowp_i32vec3;
|
||||||
|
/// Medium precision 32 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int32, mediump> mediump_i32vec3;
|
||||||
|
/// High precision 32 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int32, highp> highp_i32vec3;
|
||||||
|
/// 32 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int32, defaultp> i32vec3;
|
||||||
|
|
||||||
|
/// Low precision 64 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int64, lowp> lowp_i64vec3;
|
||||||
|
/// Medium precision 64 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int64, mediump> mediump_i64vec3;
|
||||||
|
/// High precision 64 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int64, highp> highp_i64vec3;
|
||||||
|
/// 64 bit signed integer vector of 3 components type.
|
||||||
|
typedef vec<3, int64, defaultp> i64vec3;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_int4_sized.hpp
Normal file
65
glm/ext/vector_int4_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_int4_sized
|
||||||
|
/// @file glm/ext/vector_int4_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_int4_sized GLM_EXT_vector_int4_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized signed integer vector of 4 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_int4_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_int_sized
|
||||||
|
/// @see ext_vector_uint4_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_int4.hpp"
|
||||||
|
#include "../ext/scalar_int_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_int4_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_int4_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int8, lowp> lowp_i8vec4;
|
||||||
|
/// Medium precision 8 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int8, mediump> mediump_i8vec4;
|
||||||
|
/// High precision 8 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int8, highp> highp_i8vec4;
|
||||||
|
/// 8 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int8, defaultp> i8vec4;
|
||||||
|
|
||||||
|
/// Low precision 16 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int16, lowp> lowp_i16vec4;
|
||||||
|
/// Medium precision 16 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int16, mediump> mediump_i16vec4;
|
||||||
|
/// High precision 16 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int16, highp> highp_i16vec4;
|
||||||
|
/// 16 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int16, defaultp> i16vec4;
|
||||||
|
|
||||||
|
/// Low precision 32 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int32, lowp> lowp_i32vec4;
|
||||||
|
/// Medium precision 32 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int32, mediump> mediump_i32vec4;
|
||||||
|
/// High precision 32 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int32, highp> highp_i32vec4;
|
||||||
|
/// 32 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int32, defaultp> i32vec4;
|
||||||
|
|
||||||
|
/// Low precision 64 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int64, lowp> lowp_i64vec4;
|
||||||
|
/// Medium precision 64 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int64, mediump> mediump_i64vec4;
|
||||||
|
/// High precision 64 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int64, highp> highp_i64vec4;
|
||||||
|
/// 64 bit signed integer vector of 4 components type.
|
||||||
|
typedef vec<4, int64, defaultp> i64vec4;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
32
glm/ext/vector_packing.hpp
Normal file
32
glm/ext/vector_packing.hpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/// @ref vector_packing
|
||||||
|
/// @file glm/ext/vector_packing.hpp
|
||||||
|
///
|
||||||
|
/// @see core (dependence)
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_packing GLM_EXT_vector_packing
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_packing.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// This extension provides a set of function to convert vertors to packed
|
||||||
|
/// formats.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Dependency:
|
||||||
|
#include "../detail/qualifier.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_packing extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_packing
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}// namespace glm
|
||||||
|
|
||||||
|
#include "vector_packing.inl"
|
0
glm/ext/vector_packing.inl
Normal file
0
glm/ext/vector_packing.inl
Normal file
65
glm/ext/vector_uint1_sized.hpp
Normal file
65
glm/ext/vector_uint1_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_uint1_sized
|
||||||
|
/// @file glm/ext/vector_uint1_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_uint1_sized GLM_EXT_vector_uint1_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized unsigned integer vector types.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_uint1_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_uint_sized
|
||||||
|
/// @see ext_vector_int1_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_uint1.hpp"
|
||||||
|
#include "../ext/scalar_uint_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_uint1_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_uint1_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint8, lowp> lowp_u8vec1;
|
||||||
|
/// Medium precision 8 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint8, mediump> mediump_u8vec1;
|
||||||
|
/// High precision 8 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint8, highp> highp_u8vec1;
|
||||||
|
/// 8 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint8, defaultp> u8vec1;
|
||||||
|
|
||||||
|
/// Low precision 16 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint16, lowp> lowp_u16vec1;
|
||||||
|
/// Medium precision 16 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint16, mediump> mediump_u16vec1;
|
||||||
|
/// High precision 16 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint16, highp> highp_u16vec1;
|
||||||
|
/// 16 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint16, defaultp> u16vec1;
|
||||||
|
|
||||||
|
/// Low precision 32 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint32, lowp> lowp_u32vec1;
|
||||||
|
/// Medium precision 32 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint32, mediump> mediump_u32vec1;
|
||||||
|
/// High precision 32 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint32, highp> highp_u32vec1;
|
||||||
|
/// 32 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint32, defaultp> u32vec1;
|
||||||
|
|
||||||
|
/// Low precision 64 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint64, lowp> lowp_u64vec1;
|
||||||
|
/// Medium precision 64 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint64, mediump> mediump_u64vec1;
|
||||||
|
/// High precision 64 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint64, highp> highp_u64vec1;
|
||||||
|
/// 64 bit unsigned integer vector of 1 component type.
|
||||||
|
typedef vec<1, uint64, defaultp> u64vec1;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_uint2_sized.hpp
Normal file
65
glm/ext/vector_uint2_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_uint2_sized
|
||||||
|
/// @file glm/ext/vector_uint2_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_uint2_sized GLM_EXT_vector_uint2_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized unsigned integer vector of 2 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_uint2_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_uint_sized
|
||||||
|
/// @see ext_vector_int2_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_uint2.hpp"
|
||||||
|
#include "../ext/scalar_uint_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_uint2_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_uint2_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint8, lowp> lowp_u8vec2;
|
||||||
|
/// Medium precision 8 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint8, mediump> mediump_u8vec2;
|
||||||
|
/// High precision 8 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint8, highp> highp_u8vec2;
|
||||||
|
/// 8 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint8, defaultp> u8vec2;
|
||||||
|
|
||||||
|
/// Low precision 16 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint16, lowp> lowp_u16vec2;
|
||||||
|
/// Medium precision 16 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint16, mediump> mediump_u16vec2;
|
||||||
|
/// High precision 16 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint16, highp> highp_u16vec2;
|
||||||
|
/// 16 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint16, defaultp> u16vec2;
|
||||||
|
|
||||||
|
/// Low precision 32 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint32, lowp> lowp_u32vec2;
|
||||||
|
/// Medium precision 32 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint32, mediump> mediump_u32vec2;
|
||||||
|
/// High precision 32 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint32, highp> highp_u32vec2;
|
||||||
|
/// 32 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint32, defaultp> u32vec2;
|
||||||
|
|
||||||
|
/// Low precision 64 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint64, lowp> lowp_u64vec2;
|
||||||
|
/// Medium precision 64 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint64, mediump> mediump_u64vec2;
|
||||||
|
/// High precision 64 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint64, highp> highp_u64vec2;
|
||||||
|
/// 64 bit unsigned integer vector of 2 components type.
|
||||||
|
typedef vec<2, uint64, defaultp> u64vec2;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_uint3_sized.hpp
Normal file
65
glm/ext/vector_uint3_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_uint3_sized
|
||||||
|
/// @file glm/ext/vector_uint3_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_uint3_sized GLM_EXT_vector_uint3_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized unsigned integer vector of 3 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_uint3_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_uint_sized
|
||||||
|
/// @see ext_vector_int3_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_uint3.hpp"
|
||||||
|
#include "../ext/scalar_uint_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_uint3_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_uint3_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint8, lowp> lowp_u8vec3;
|
||||||
|
/// Medium precision 8 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint8, mediump> mediump_u8vec3;
|
||||||
|
/// High precision 8 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint8, highp> highp_u8vec3;
|
||||||
|
/// 8 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint8, defaultp> u8vec3;
|
||||||
|
|
||||||
|
/// Low precision 16 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint16, lowp> lowp_u16vec3;
|
||||||
|
/// Medium precision 16 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint16, mediump> mediump_u16vec3;
|
||||||
|
/// High precision 16 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint16, highp> highp_u16vec3;
|
||||||
|
/// 16 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint16, defaultp> u16vec3;
|
||||||
|
|
||||||
|
/// Low precision 32 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint32, lowp> lowp_u32vec3;
|
||||||
|
/// Medium precision 32 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint32, mediump> mediump_u32vec3;
|
||||||
|
/// High precision 32 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint32, highp> highp_u32vec3;
|
||||||
|
/// 32 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint32, defaultp> u32vec3;
|
||||||
|
|
||||||
|
/// Low precision 64 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint64, lowp> lowp_u64vec3;
|
||||||
|
/// Medium precision 64 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint64, mediump> mediump_u64vec3;
|
||||||
|
/// High precision 64 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint64, highp> highp_u64vec3;
|
||||||
|
/// 64 bit unsigned integer vector of 3 components type.
|
||||||
|
typedef vec<3, uint64, defaultp> u64vec3;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
65
glm/ext/vector_uint4_sized.hpp
Normal file
65
glm/ext/vector_uint4_sized.hpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/// @ref ext_vector_uint4_sized
|
||||||
|
/// @file glm/ext/vector_uint4_sized.hpp
|
||||||
|
///
|
||||||
|
/// @defgroup ext_vector_uint4_sized GLM_EXT_vector_uint4_sized
|
||||||
|
/// @ingroup ext
|
||||||
|
///
|
||||||
|
/// Exposes sized unsigned integer vector of 4 components type.
|
||||||
|
///
|
||||||
|
/// Include <glm/ext/vector_uint4_sized.hpp> to use the features of this extension.
|
||||||
|
///
|
||||||
|
/// @see ext_scalar_uint_sized
|
||||||
|
/// @see ext_vector_int4_sized
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../ext/vector_uint4.hpp"
|
||||||
|
#include "../ext/scalar_uint_sized.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
|
# pragma message("GLM: GLM_EXT_vector_uint4_sized extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup ext_vector_uint4_sized
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Low precision 8 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint8, lowp> lowp_u8vec4;
|
||||||
|
/// Medium precision 8 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint8, mediump> mediump_u8vec4;
|
||||||
|
/// High precision 8 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint8, highp> highp_u8vec4;
|
||||||
|
/// 8 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint8, defaultp> u8vec4;
|
||||||
|
|
||||||
|
/// Low precision 16 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint16, lowp> lowp_u16vec4;
|
||||||
|
/// Medium precision 16 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint16, mediump> mediump_u16vec4;
|
||||||
|
/// High precision 16 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint16, highp> highp_u16vec4;
|
||||||
|
/// 16 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint16, defaultp> u16vec4;
|
||||||
|
|
||||||
|
/// Low precision 32 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint32, lowp> lowp_u32vec4;
|
||||||
|
/// Medium precision 32 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint32, mediump> mediump_u32vec4;
|
||||||
|
/// High precision 32 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint32, highp> highp_u32vec4;
|
||||||
|
/// 32 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint32, defaultp> u32vec4;
|
||||||
|
|
||||||
|
/// Low precision 64 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint64, lowp> lowp_u64vec4;
|
||||||
|
/// Medium precision 64 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint64, mediump> mediump_u64vec4;
|
||||||
|
/// High precision 64 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint64, highp> highp_u64vec4;
|
||||||
|
/// 64 bit unsigned integer vector of 4 components type.
|
||||||
|
typedef vec<4, uint64, defaultp> u64vec4;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
}//namespace glm
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "type_precision.hpp"
|
#include "type_precision.hpp"
|
||||||
|
#include "../ext/vector_packing.hpp"
|
||||||
|
|
||||||
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_packing extension included")
|
# pragma message("GLM: GLM_GTC_packing extension included")
|
||||||
@ -721,7 +722,6 @@ namespace glm
|
|||||||
/// @see int packUint2x16(u32vec2 const& v)
|
/// @see int packUint2x16(u32vec2 const& v)
|
||||||
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);
|
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);
|
||||||
|
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|
||||||
|
@ -16,7 +16,15 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
#include "../gtc/vec1.hpp"
|
#include "../gtc/vec1.hpp"
|
||||||
|
#include "../ext/vector_int1_sized.hpp"
|
||||||
|
#include "../ext/vector_int2_sized.hpp"
|
||||||
|
#include "../ext/vector_int3_sized.hpp"
|
||||||
|
#include "../ext/vector_int4_sized.hpp"
|
||||||
#include "../ext/scalar_int_sized.hpp"
|
#include "../ext/scalar_int_sized.hpp"
|
||||||
|
#include "../ext/vector_uint1_sized.hpp"
|
||||||
|
#include "../ext/vector_uint2_sized.hpp"
|
||||||
|
#include "../ext/vector_uint3_sized.hpp"
|
||||||
|
#include "../ext/vector_uint4_sized.hpp"
|
||||||
#include "../ext/scalar_uint_sized.hpp"
|
#include "../ext/scalar_uint_sized.hpp"
|
||||||
#include "../detail/type_vec2.hpp"
|
#include "../detail/type_vec2.hpp"
|
||||||
#include "../detail/type_vec3.hpp"
|
#include "../detail/type_vec3.hpp"
|
||||||
@ -227,289 +235,6 @@ namespace glm
|
|||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef detail::int64 i64;
|
typedef detail::int64 i64;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Low qualifier 8 bit signed integer scalar 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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// 8 bit signed integer scalar type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<1, i8, defaultp> i8vec1;
|
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 2 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<2, i8, defaultp> i8vec2;
|
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 3 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<3, i8, defaultp> i8vec3;
|
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 4 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<4, i8, defaultp> 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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// 16 bit signed integer scalar type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<1, i16, defaultp> i16vec1;
|
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 2 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<2, i16, defaultp> i16vec2;
|
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 3 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<3, i16, defaultp> i16vec3;
|
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 4 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<4, i16, defaultp> 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;
|
|
||||||
|
|
||||||
|
|
||||||
/// 32 bit signed integer scalar type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<1, i32, defaultp> i32vec1;
|
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 2 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<2, i32, defaultp> i32vec2;
|
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 3 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<3, i32, defaultp> i32vec3;
|
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 4 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<4, i32, defaultp> 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;
|
|
||||||
|
|
||||||
|
|
||||||
/// 64 bit signed integer scalar type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<1, i64, defaultp> i64vec1;
|
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 2 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<2, i64, defaultp> i64vec2;
|
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 3 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<3, i64, defaultp> i64vec3;
|
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 4 components type.
|
|
||||||
/// @see gtc_type_precision
|
|
||||||
typedef vec<4, i64, defaultp> i64vec4;
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Unsigned int vector types
|
// Unsigned int vector types
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
/// @addtogroup gtx_polar_coordinates
|
/// @addtogroup gtx_polar_coordinates
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
|
/// Convert Euclidean to Polar coordinates, x is the latitude, y the longitude and z the xz distance.
|
||||||
///
|
///
|
||||||
/// @see gtx_polar_coordinates
|
/// @see gtx_polar_coordinates
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
|
@ -53,6 +53,10 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
|
|||||||
|
|
||||||
## Release notes
|
## Release notes
|
||||||
|
|
||||||
|
### [GLM 0.9.9.8](https://github.com/g-truc/glm/releases/tag/0.9.9.8) - 2020-0X-XX
|
||||||
|
#### Features:
|
||||||
|
- Added GLM_EXT_vector_intX_sized and GLM_EXT_vector_uintX_sized extensions
|
||||||
|
|
||||||
### [GLM 0.9.9.7](https://github.com/g-truc/glm/releases/tag/0.9.9.7) - 2020-01-05
|
### [GLM 0.9.9.7](https://github.com/g-truc/glm/releases/tag/0.9.9.7) - 2020-01-05
|
||||||
#### Improvements:
|
#### Improvements:
|
||||||
- Improved Neon support with more functions optimized #950
|
- Improved Neon support with more functions optimized #950
|
||||||
|
@ -19,8 +19,16 @@ glmCreateTestGTC(ext_vec1)
|
|||||||
glmCreateTestGTC(ext_vector_bool1)
|
glmCreateTestGTC(ext_vector_bool1)
|
||||||
glmCreateTestGTC(ext_vector_common)
|
glmCreateTestGTC(ext_vector_common)
|
||||||
glmCreateTestGTC(ext_vector_iec559)
|
glmCreateTestGTC(ext_vector_iec559)
|
||||||
|
glmCreateTestGTC(ext_vector_int1_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_int2_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_int3_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_int4_sized)
|
||||||
glmCreateTestGTC(ext_vector_integer)
|
glmCreateTestGTC(ext_vector_integer)
|
||||||
glmCreateTestGTC(ext_vector_integer_sized)
|
glmCreateTestGTC(ext_vector_integer_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_uint1_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_uint2_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_uint3_sized)
|
||||||
|
glmCreateTestGTC(ext_vector_uint4_sized)
|
||||||
glmCreateTestGTC(ext_vector_relational)
|
glmCreateTestGTC(ext_vector_relational)
|
||||||
glmCreateTestGTC(ext_vector_ulp)
|
glmCreateTestGTC(ext_vector_ulp)
|
||||||
|
|
||||||
|
28
test/ext/ext_scalar_packing.cpp
Normal file
28
test/ext/ext_scalar_packing.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include <glm/ext/scalar_packing.hpp>
|
||||||
|
#include <glm/ext/scalar_relational.hpp>
|
||||||
|
|
||||||
|
int test_packUnorm()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_packSnorm()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_packUnorm();
|
||||||
|
Error += test_packSnorm();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_int1_sized.cpp
Normal file
71
test/ext/ext_vector_int1_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::i8vec1) < sizeof(glm::i16vec1) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i16vec1) < sizeof(glm::i32vec1) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i32vec1) < sizeof(glm::i64vec1) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_int2_sized.cpp
Normal file
71
test/ext/ext_vector_int2_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::i8vec2) < sizeof(glm::i16vec2) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i16vec2) < sizeof(glm::i32vec2) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i32vec2) < sizeof(glm::i64vec2) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_int3_sized.cpp
Normal file
71
test/ext/ext_vector_int3_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::i8vec3) < sizeof(glm::i16vec3) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i16vec3) < sizeof(glm::i32vec3) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i32vec3) < sizeof(glm::i64vec3) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_int4_sized.cpp
Normal file
71
test/ext/ext_vector_int4_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::i8vec4) < sizeof(glm::i16vec4) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i16vec4) < sizeof(glm::i32vec4) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::i32vec4) < sizeof(glm::i64vec4) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
58
test/ext/ext_vector_packing.cpp
Normal file
58
test/ext/ext_vector_packing.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include <glm/ext/vector_packing.hpp>
|
||||||
|
#include <glm/ext/vector_relational.hpp>
|
||||||
|
#include <glm/ext/vector_uint2_sized.hpp>
|
||||||
|
#include <glm/ext/vector_int2_sized.hpp>
|
||||||
|
#include <glm/gtc/packing.hpp>
|
||||||
|
#include <glm/vec2.hpp>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
int test_packUnorm()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
std::vector<glm::vec2> A;
|
||||||
|
A.push_back(glm::vec2(1.0f, 0.7f));
|
||||||
|
A.push_back(glm::vec2(0.5f, 0.1f));
|
||||||
|
|
||||||
|
for (std::size_t i = 0; i < A.size(); ++i)
|
||||||
|
{
|
||||||
|
glm::vec2 B(A[i]);
|
||||||
|
glm::u16vec2 C = glm::packUnorm<glm::uint16>(B);
|
||||||
|
glm::vec2 D = glm::unpackUnorm<float>(C);
|
||||||
|
Error += glm::all(glm::equal(B, D, 1.0f / 255.f)) ? 0 : 1;
|
||||||
|
assert(!Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_packSnorm()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
std::vector<glm::vec2> A;
|
||||||
|
A.push_back(glm::vec2(1.0f, 0.0f));
|
||||||
|
A.push_back(glm::vec2(-0.5f, -0.7f));
|
||||||
|
A.push_back(glm::vec2(-0.1f, 0.1f));
|
||||||
|
|
||||||
|
for (std::size_t i = 0; i < A.size(); ++i)
|
||||||
|
{
|
||||||
|
glm::vec2 B(A[i]);
|
||||||
|
glm::i16vec2 C = glm::packSnorm<glm::int16>(B);
|
||||||
|
glm::vec2 D = glm::unpackSnorm<float>(C);
|
||||||
|
Error += glm::all(glm::equal(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
|
||||||
|
assert(!Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_packUnorm();
|
||||||
|
Error += test_packSnorm();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_uint1_sized.cpp
Normal file
71
test/ext/ext_vector_uint1_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::u8vec1) < sizeof(glm::u16vec1) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u16vec1) < sizeof(glm::u32vec1) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u32vec1) < sizeof(glm::u64vec1) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_uint2_sized.cpp
Normal file
71
test/ext/ext_vector_uint2_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::u8vec2) < sizeof(glm::u16vec2) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u16vec2) < sizeof(glm::u32vec2) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u32vec2) < sizeof(glm::u64vec2) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_uint3_sized.cpp
Normal file
71
test/ext/ext_vector_uint3_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::u8vec3) < sizeof(glm::u16vec3) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u16vec3) < sizeof(glm::u32vec3) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u32vec3) < sizeof(glm::u64vec3) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
71
test/ext/ext_vector_uint4_sized.cpp
Normal file
71
test/ext/ext_vector_uint4_sized.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_comp()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += sizeof(glm::u8vec4) < sizeof(glm::u16vec4) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u16vec4) < sizeof(glm::u32vec4) ? 0 : 1;
|
||||||
|
Error += sizeof(glm::u32vec4) < sizeof(glm::u64vec4) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_size();
|
||||||
|
Error += test_comp();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user