diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index d11d7052..ed18de40 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -24,6 +24,16 @@ namespace detail #elif(GLM_COMPILER & GLM_COMPILER_GCC) __extension__ typedef signed long long sint64; __extension__ typedef unsigned long long uint64; +//# if GLM_MODEL == GLM_MODEL_64 +// typedef signed long highp_int_t; +// typedef unsigned long highp_uint_t; +//# elif GLM_MODEL == GLM_MODEL_32 +// __extension__ typedef signed long long highp_int_t; +// __extension__ typedef unsigned long long highp_uint_t; +//# endif//GLM_MODEL +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; #else//unknown compiler typedef signed long sint64; typedef unsigned long uint64; diff --git a/glm/core/type_int.hpp b/glm/core/type_int.hpp index e788d333..3f7aa0ab 100644 --- a/glm/core/type_int.hpp +++ b/glm/core/type_int.hpp @@ -17,26 +17,13 @@ namespace glm { namespace detail { -#if defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC) - typedef signed __int64 highp_int_t; - typedef unsigned __int64 highp_uint_t; -#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) - __extension__ typedef signed long long highp_int_t; - __extension__ typedef unsigned long long highp_uint_t; -//# if GLM_MODEL == GLM_MODEL_64 -// typedef signed long highp_int_t; -// typedef unsigned long highp_uint_t; -//# elif GLM_MODEL == GLM_MODEL_32 -// __extension__ typedef signed long long highp_int_t; -// __extension__ typedef unsigned long long highp_uint_t; -//# endif//GLM_MODEL -#elif(defined(GLM_COMPILER_BC)) - typedef Int64 highp_int_t; - typedef Uint64 highp_uint_t; -#else - typedef signed long long highp_int_t; - typedef unsigned long long highp_uint_t; -#endif//GLM_COMPILER + typedef signed short lowp_int_t; + typedef signed int mediump_int_t; + typedef sint64 highp_int_t; + + typedef unsigned short lowp_uint_t; + typedef unsigned int mediump_uint_t; + typedef uint64 highp_uint_t; GLM_DETAIL_IS_INT(signed char); GLM_DETAIL_IS_INT(signed short); @@ -49,14 +36,6 @@ namespace glm GLM_DETAIL_IS_UINT(unsigned int); GLM_DETAIL_IS_UINT(unsigned long); GLM_DETAIL_IS_UINT(highp_uint_t); - - typedef signed short lowp_int_t; - typedef signed int mediump_int_t; - typedef detail::highp_int_t highp_int_t; - - typedef unsigned short lowp_uint_t; - typedef unsigned int mediump_uint_t; - typedef detail::highp_uint_t highp_uint_t; } //namespace detail diff --git a/glm/glm.hpp b/glm/glm.hpp index a587e78c..67b20753 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -95,18 +95,20 @@ namespace glm //////////////////// // check type sizes -GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); +#ifndef GLM_STATIC_ASSERT_NULL + GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); -GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); +#endif//GLM_STATIC_ASSERT_NULL #endif //glm_glm diff --git a/glm/setup.hpp b/glm/setup.hpp index 65c4c071..29c9a2f8 100644 --- a/glm/setup.hpp +++ b/glm/setup.hpp @@ -365,6 +365,7 @@ # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1] #else # define GLM_STATIC_ASSERT(x, message) +# define GLM_STATIC_ASSERT_NULL #endif//GLM_LANG ///////////////////////////////////////////////////////////////////////////////////////////////////