diff --git a/doc/glm.docx b/doc/glm.docx index 8d3350c5..1da42593 100644 Binary files a/doc/glm.docx and b/doc/glm.docx differ diff --git a/doc/glm.pdf b/doc/glm.pdf index 4ed3568f..79c34270 100644 Binary files a/doc/glm.pdf and b/doc/glm.pdf differ diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index e38d51bb..c868c338 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -3,6 +3,28 @@ #pragma once +#if (defined(GLM_FORCE_SWIZZLE) || defined(GLM_SWIZZLE)) && defined(GLM_FORCE_UNRESTRICTED_GENTYPE) +# error "Both GLM_FORCE_SWIZZLE and GLM_FORCE_UNRESTRICTED_GENTYPE can't be defined at the same time" +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// Messages + +#ifdef GLM_MESSAGES +# pragma message("GLM: GLM_MESSAGES is deprecated, use GLM_FORCE_MESSAGES instead") +#endif + +#define GLM_MESSAGES_ENABLED 1 +#define GLM_MESSAGES_DISABLE 0 + +#if defined(GLM_FORCE_MESSAGES) || defined(GLM_MESSAGES) +# undef GLM_MESSAGES +# define GLM_MESSAGES GLM_MESSAGES_ENABLED +#else +# undef GLM_MESSAGES +# define GLM_MESSAGES GLM_MESSAGES_DISABLE +#endif + #include #include #include "../simd/platform.h" @@ -16,13 +38,13 @@ #define GLM_VERSION_PATCH 9 #define GLM_VERSION_REVISION 0 -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_VERSION_DISPLAYED) # define GLM_MESSAGE_VERSION_DISPLAYED # pragma message ("GLM: version 0.9.9.0") #endif//GLM_MESSAGES // Report compiler detection -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_COMPILER_DISPLAYED) # define GLM_MESSAGE_COMPILER_DISPLAYED # if GLM_COMPILER & GLM_COMPILER_CUDA # pragma message("GLM: CUDA compiler detected") @@ -54,7 +76,7 @@ # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message." #endif//GLM_MODEL -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_MODEL_DISPLAYED) # define GLM_MESSAGE_MODEL_DISPLAYED # if(GLM_MODEL == GLM_MODEL_64) # pragma message("GLM: 64 bits model") @@ -63,7 +85,7 @@ # endif//GLM_MODEL #endif//GLM_MESSAGES -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_ARCH_DISPLAYED) # define GLM_MESSAGE_ARCH_DISPLAYED # if(GLM_ARCH == GLM_ARCH_PURE) # pragma message("GLM: Platform independent code") @@ -230,7 +252,7 @@ # endif #endif -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_LANG_DISPLAYED) # define GLM_MESSAGE_LANG_DISPLAYED # if GLM_LANG & GLM_LANG_CXX1Z_FLAG @@ -524,17 +546,44 @@ /////////////////////////////////////////////////////////////////////////////////// // Swizzle operators -// User defines: GLM_SWIZZLE +// User defines: GLM_FORCE_SWIZZLE -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED) +#ifdef GLM_SWIZZLE +# pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead") +#endif + +#define GLM_SWIZZLE_ENABLED 1 +#define GLM_SWIZZLE_DISABLE 0 + +#if defined(GLM_FORCE_SWIZZLE) || defined(GLM_SWIZZLE) +# undef GLM_SWIZZLE +# define GLM_SWIZZLE GLM_SWIZZLE_ENABLED +#else +# undef GLM_SWIZZLE +# define GLM_SWIZZLE GLM_SWIZZLE_DISABLE +#endif + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED) # define GLM_MESSAGE_SWIZZLE_DISPLAYED -# if defined(GLM_SWIZZLE) +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # pragma message("GLM: Swizzling operators enabled") # else # pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators") # endif #endif//GLM_MESSAGES +/////////////////////////////////////////////////////////////////////////////////// +// Allows using not basic types as genType + +// #define GLM_FORCE_UNRESTRICTED_GENTYPE + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED) +# define GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED +# ifdef GLM_FORCE_UNRESTRICTED_GENTYPE +# pragma message("GLM: Use unrestricted genType") +# endif +#endif//GLM_MESSAGES + /////////////////////////////////////////////////////////////////////////////////// // Clip control @@ -551,6 +600,15 @@ # define GLM_DEPTH_CLIP_SPACE GLM_DEPTH_NEGATIVE_ONE_TO_ONE #endif +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_DEPTH_DISPLAYED) +# define GLM_MESSAGE_DEPTH_DISPLAYED +# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE +# pragma message("GLM: Depth clip space: Zero to one") +# else +# pragma message("GLM: Depth clip space: negative one to one") +# endif +#endif//GLM_MESSAGES + /////////////////////////////////////////////////////////////////////////////////// // Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM // to use left handed coordinate system by default. @@ -566,7 +624,16 @@ # define GLM_COORDINATE_SYSTEM GLM_LEFT_HANDED #else # define GLM_COORDINATE_SYSTEM GLM_RIGHT_HANDED -#endif +#endif + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_HANDED_DISPLAYED) +# define GLM_MESSAGE_HANDED_DISPLAYED +# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED +# pragma message("GLM: Coordinate system: left handed") +# else +# pragma message("GLM: Coordinate system: right handed") +# endif +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // Qualifiers @@ -617,7 +684,7 @@ # define GLM_VECTOR_CALL #endif//GLM_COMPILER -#if GLM_HAS_DEFAULTED_FUNCTIONS +#if GLM_HAS_DEFAULTED_FUNCTIONS && !defined(GLM_FORCE_UNRESTRICTED_GENTYPE) # define GLM_DEFAULT = default # ifdef GLM_FORCE_NO_CTOR_INIT # define GLM_DEFAULT_CTOR = default @@ -674,7 +741,7 @@ namespace glm # endif }//namespace glm -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH) # define GLM_MESSAGE_FORCE_SIZE_T_LENGTH # if defined GLM_FORCE_SIZE_T_LENGTH # pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t") diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index fe55cd22..dd673a7c 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -5,7 +5,7 @@ #include "../fwd.hpp" #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else @@ -44,7 +44,7 @@ namespace glm T r; T s; /* -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, x) _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, r) _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, s) @@ -66,7 +66,7 @@ namespace glm # else union {T x, r, s;}; /* -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, P, tvec2, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE*/ # endif @@ -110,13 +110,13 @@ namespace glm // -- Swizzle constructors -- /* -# if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +# if(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)) template GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const & that) { *this = that(); } -# endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +# endif//(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)) */ // -- Unary arithmetic operators -- diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 331782dd..9a9ef42d 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -4,7 +4,7 @@ #pragma once #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else @@ -43,7 +43,7 @@ namespace glm struct{ T r, g; }; struct{ T s, t; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, x, y) _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, r, g) _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, s, t) @@ -67,7 +67,7 @@ namespace glm union {T x, r, s;}; union {T y, g, t;}; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE # endif @@ -116,13 +116,13 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec2(tvec2 const & v); // -- Swizzle constructors -- -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, glm::tvec2, E0, E1,-1,-2> const& that) { *this = that(); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index f90ad3c6..ebd135d6 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -4,13 +4,13 @@ #pragma once #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else # include "_swizzle_func.hpp" # endif -#endif //GLM_SWIZZLE +#endif //GLM_SWIZZLE == GLM_SWIZZLE_ENABLED #include namespace glm @@ -43,7 +43,7 @@ namespace glm struct{ T r, g, b; }; struct{ T s, t, p; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, x, y, z) _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, r, g, b) _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, s, t, p) @@ -67,7 +67,7 @@ namespace glm union { T y, g, t; }; union { T z, b, p; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE # endif//GLM_LANG @@ -125,7 +125,7 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec3(tvec3 const & v); // -- Swizzle constructors -- -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & that) { @@ -143,7 +143,7 @@ namespace glm { *this = tvec3(scalar, v()); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index e74865bd..4cd69dcd 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -4,7 +4,7 @@ #pragma once #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else @@ -45,7 +45,7 @@ namespace glm typename detail::storage::value>::type data; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, x, y, z, w) _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, r, g, b, a) _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, s, t, p, q) @@ -70,7 +70,7 @@ namespace glm union { T z, b, p; }; union { T w, a, q; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE # endif @@ -146,7 +146,7 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec4(tvec4 const& v); // -- Swizzle constructors -- -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, glm::tvec4, E0, E1, E2, E3> const & that) { @@ -188,7 +188,7 @@ namespace glm { *this = tvec4(x, v()); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index 97b65f44..6ae818f5 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -6,7 +6,7 @@ namespace glm{ namespace detail { -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED template struct _swizzle_base1<4, float, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0 { @@ -49,7 +49,7 @@ namespace detail return Result; } }; -# endif//GLM_SWIZZLE +# endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED template struct compute_vec4_add diff --git a/glm/ext.hpp b/glm/ext.hpp index dee032e3..ca2e9e82 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -27,7 +27,9 @@ #pragma once -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)) +#include "glm.hpp" + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED) # define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED # pragma message("GLM: All extensions included (not recommanded)") #endif//GLM_MESSAGES diff --git a/glm/glm.hpp b/glm/glm.hpp index c6a82f85..021a3609 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -60,7 +60,7 @@ #include #include "fwd.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED) # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED # pragma message("GLM: Core library included") #endif//GLM_MESSAGES diff --git a/glm/gtc/bitfield.hpp b/glm/gtc/bitfield.hpp index 47214d35..38a38b69 100644 --- a/glm/gtc/bitfield.hpp +++ b/glm/gtc/bitfield.hpp @@ -20,7 +20,7 @@ #include "../detail/_vectorize.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_bitfield extension included") #endif diff --git a/glm/gtc/bitfield.inl b/glm/gtc/bitfield.inl index af522bdf..490cfb32 100644 --- a/glm/gtc/bitfield.inl +++ b/glm/gtc/bitfield.inl @@ -231,7 +231,7 @@ namespace detail } template class vecIUType> - GLM_FUNC_QUALIFIER vecIUType mask(vecIUType const & v) + GLM_FUNC_QUALIFIER vecIUType mask(vecIUType const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'mask' accepts only integer values"); @@ -266,7 +266,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldRotateLeft(vecType const & In, int Shift) + GLM_FUNC_QUALIFIER vecType bitfieldRotateLeft(vecType const& In, int Shift) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateLeft' accepts only integer values"); @@ -281,7 +281,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldFillOne(vecType const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType bitfieldFillOne(vecType const& Value, int FirstBit, int BitCount) { return Value | static_cast(mask(BitCount) << FirstBit); } @@ -293,7 +293,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType bitfieldFillZero(vecType const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType bitfieldFillZero(vecType const& Value, int FirstBit, int BitCount) { return Value & static_cast(~(mask(BitCount) << FirstBit)); } diff --git a/glm/gtc/color_space.hpp b/glm/gtc/color_space.hpp index 327fa79c..636e5ed8 100644 --- a/glm/gtc/color_space.hpp +++ b/glm/gtc/color_space.hpp @@ -21,7 +21,7 @@ #include "../vec4.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_color_space extension included") #endif diff --git a/glm/gtc/color_space.inl b/glm/gtc/color_space.inl index 662e6d39..3fe293b0 100644 --- a/glm/gtc/color_space.inl +++ b/glm/gtc/color_space.inl @@ -7,7 +7,7 @@ namespace detail template class vecType> struct compute_rgbToSrgb { - GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static vecType call(vecType const& ColorRGB, T GammaCorrection) { vecType const ClampedColor(clamp(ColorRGB, static_cast(0), static_cast(1))); @@ -21,7 +21,7 @@ namespace detail template struct compute_rgbToSrgb { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& ColorRGB, T GammaCorrection) { return tvec4(compute_rgbToSrgb::call(tvec3(ColorRGB), GammaCorrection), ColorRGB.a); } @@ -30,7 +30,7 @@ namespace detail template class vecType> struct compute_srgbToRgb { - GLM_FUNC_QUALIFIER static vecType call(vecType const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static vecType call(vecType const& ColorSRGB, T Gamma) { return mix( pow((ColorSRGB + static_cast(0.055)) * static_cast(0.94786729857819905213270142180095), vecType(Gamma)), @@ -42,7 +42,7 @@ namespace detail template struct compute_srgbToRgb { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& ColorSRGB, T Gamma) { return tvec4(compute_srgbToRgb::call(tvec3(ColorSRGB), Gamma), ColorSRGB.a); } @@ -50,25 +50,25 @@ namespace detail }//namespace detail template class vecType> - GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear) + GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const& ColorLinear) { return detail::compute_rgbToSrgb::call(ColorLinear, static_cast(0.41666)); } template class vecType> - GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma) + GLM_FUNC_QUALIFIER vecType convertLinearToSRGB(vecType const& ColorLinear, T Gamma) { return detail::compute_rgbToSrgb::call(ColorLinear, static_cast(1) / Gamma); } template class vecType> - GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB) + GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const& ColorSRGB) { return detail::compute_srgbToRgb::call(ColorSRGB, static_cast(2.4)); } template class vecType> - GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER vecType convertSRGBToLinear(vecType const& ColorSRGB, T Gamma) { return detail::compute_srgbToRgb::call(ColorSRGB, Gamma); } diff --git a/glm/gtc/constants.hpp b/glm/gtc/constants.hpp index 8c82a7c2..d3358c76 100644 --- a/glm/gtc/constants.hpp +++ b/glm/gtc/constants.hpp @@ -16,7 +16,7 @@ // Dependencies #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_constants extension included") #endif diff --git a/glm/gtc/epsilon.hpp b/glm/gtc/epsilon.hpp index a76aaaf7..289f5b74 100644 --- a/glm/gtc/epsilon.hpp +++ b/glm/gtc/epsilon.hpp @@ -18,7 +18,7 @@ #include "../detail/setup.hpp" #include "../detail/precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_epsilon extension included") #endif diff --git a/glm/gtc/functions.hpp b/glm/gtc/functions.hpp index d9449643..ab1590b4 100644 --- a/glm/gtc/functions.hpp +++ b/glm/gtc/functions.hpp @@ -19,7 +19,7 @@ #include "../detail/precision.hpp" #include "../detail/type_vec2.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_functions extension included") #endif diff --git a/glm/gtc/integer.hpp b/glm/gtc/integer.hpp index a863f4cb..69ffb1d3 100644 --- a/glm/gtc/integer.hpp +++ b/glm/gtc/integer.hpp @@ -21,7 +21,7 @@ #include "../detail/func_exponential.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_integer extension included") #endif diff --git a/glm/gtc/matrix_access.hpp b/glm/gtc/matrix_access.hpp index 87f80fbb..e4156ef4 100644 --- a/glm/gtc/matrix_access.hpp +++ b/glm/gtc/matrix_access.hpp @@ -14,7 +14,7 @@ // Dependency: #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_access extension included") #endif diff --git a/glm/gtc/matrix_integer.hpp b/glm/gtc/matrix_integer.hpp index 2d070ff8..fdc816d5 100644 --- a/glm/gtc/matrix_integer.hpp +++ b/glm/gtc/matrix_integer.hpp @@ -22,7 +22,7 @@ #include "../mat4x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_integer extension included") #endif diff --git a/glm/gtc/matrix_inverse.hpp b/glm/gtc/matrix_inverse.hpp index a34cb7a9..589381d4 100644 --- a/glm/gtc/matrix_inverse.hpp +++ b/glm/gtc/matrix_inverse.hpp @@ -18,7 +18,7 @@ #include "../mat3x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_inverse extension included") #endif diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 3c949dd9..c97b89a6 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -27,7 +27,7 @@ #include "../vec4.hpp" #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_transform extension included") #endif diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 9801a2e1..dac55a4a 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -8,11 +8,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat4x4 translate - ( - tmat4x4 const & m, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tmat4x4 translate(tmat4x4 const & m, tvec3 const & v) { tmat4x4 Result(m); Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; @@ -20,12 +16,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 rotate - ( - tmat4x4 const & m, - T angle, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tmat4x4 rotate(tmat4x4 const & m, T angle, tvec3 const & v) { T const a = angle; T const c = cos(a); @@ -36,15 +27,15 @@ namespace glm tmat4x4 Rotate(uninitialize); Rotate[0][0] = c + temp[0] * axis[0]; - Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; - Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; + Rotate[0][1] = temp[0] * axis[1] + s * axis[2]; + Rotate[0][2] = temp[0] * axis[2] - s * axis[1]; - Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; + Rotate[1][0] = temp[1] * axis[0] - s * axis[2]; Rotate[1][1] = c + temp[1] * axis[1]; - Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; + Rotate[1][2] = temp[1] * axis[2] + s * axis[0]; - Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; - Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; + Rotate[2][0] = temp[2] * axis[0] + s * axis[1]; + Rotate[2][1] = temp[2] * axis[1] - s * axis[0]; Rotate[2][2] = c + temp[2] * axis[2]; tmat4x4 Result(uninitialize); @@ -56,12 +47,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 rotate_slow - ( - tmat4x4 const & m, - T angle, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tmat4x4 rotate_slow(tmat4x4 const & m, T angle, tvec3 const & v) { T const a = angle; T const c = cos(a); @@ -70,31 +56,27 @@ namespace glm tvec3 axis = normalize(v); - Result[0][0] = c + (1 - c) * axis.x * axis.x; - Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z; - Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y; - Result[0][3] = 0; + Result[0][0] = c + (static_cast(1) - c) * axis.x * axis.x; + Result[0][1] = (static_cast(1) - c) * axis.x * axis.y + s * axis.z; + Result[0][2] = (static_cast(1) - c) * axis.x * axis.z - s * axis.y; + Result[0][3] = static_cast(0); - Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z; - Result[1][1] = c + (1 - c) * axis.y * axis.y; - Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x; - Result[1][3] = 0; + Result[1][0] = (static_cast(1) - c) * axis.y * axis.x - s * axis.z; + Result[1][1] = c + (static_cast(1) - c) * axis.y * axis.y; + Result[1][2] = (static_cast(1) - c) * axis.y * axis.z + s * axis.x; + Result[1][3] = static_cast(0); - Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y; - Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x; - Result[2][2] = c + (1 - c) * axis.z * axis.z; - Result[2][3] = 0; + Result[2][0] = (static_cast(1) - c) * axis.z * axis.x + s * axis.y; + Result[2][1] = (static_cast(1) - c) * axis.z * axis.y - s * axis.x; + Result[2][2] = c + (static_cast(1) - c) * axis.z * axis.z; + Result[2][3] = static_cast(0); Result[3] = tvec4(0, 0, 0, 1); return m * Result; } template - GLM_FUNC_QUALIFIER tmat4x4 scale - ( - tmat4x4 const & m, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tmat4x4 scale(tmat4x4 const & m, tvec3 const & v) { tmat4x4 Result(uninitialize); Result[0] = m[0] * v[0]; @@ -105,11 +87,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 scale_slow - ( - tmat4x4 const & m, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tmat4x4 scale_slow(tmat4x4 const & m, tvec3 const & v) { tmat4x4 Result(T(1)); Result[0][0] = v.x; @@ -267,13 +245,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspective - ( - T fovy, - T aspect, - T zNear, - T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspective(T fovy, T aspect, T zNear, T zFar) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return perspectiveLH(fovy, aspect, zNear, zFar); @@ -283,12 +255,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspectiveRH - ( - T fovy, - T aspect, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspectiveRH(T fovy, T aspect, T zNear, T zFar) { assert(abs(aspect - std::numeric_limits::epsilon()) > static_cast(0)); @@ -311,12 +278,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspectiveLH - ( - T fovy, - T aspect, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspectiveLH(T fovy, T aspect, T zNear, T zFar) { assert(abs(aspect - std::numeric_limits::epsilon()) > static_cast(0)); @@ -339,12 +301,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspectiveFov - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspectiveFov(T fov, T width, T height, T zNear, T zFar) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return perspectiveFovLH(fov, width, height, zNear, zFar); @@ -354,12 +311,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspectiveFovRH - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspectiveFovRH(T fov, T width, T height, T zNear, T zFar) { assert(width > static_cast(0)); assert(height > static_cast(0)); @@ -386,12 +338,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 perspectiveFovLH - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4 perspectiveFovLH(T fov, T width, T height, T zNear, T zFar) { assert(width > static_cast(0)); assert(height > static_cast(0)); @@ -418,12 +365,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 infinitePerspective - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4 infinitePerspective(T fovy, T aspect, T zNear) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return infinitePerspectiveLH(fovy, aspect, zNear); @@ -433,68 +375,52 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveRH - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveRH(T fovy, T aspect, T zNear) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; - tmat4x4 Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = - T(1); - Result[2][3] = - T(1); - Result[3][2] = - T(2) * zNear; + tmat4x4 Result(static_cast(0)); + Result[0][0] = (static_cast(2) * zNear) / (right - left); + Result[1][1] = (static_cast(2) * zNear) / (top - bottom); + Result[2][2] = - static_cast(1); + Result[2][3] = - static_cast(1); + Result[3][2] = - static_cast(2) * zNear; return Result; } template - GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveLH - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4 infinitePerspectiveLH(T fovy, T aspect, T zNear) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; tmat4x4 Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = T(1); - Result[2][3] = T(1); - Result[3][2] = - T(2) * zNear; + Result[0][0] = (static_cast(2) * zNear) / (right - left); + Result[1][1] = (static_cast(2) * zNear) / (top - bottom); + Result[2][2] = static_cast(1); + Result[2][3] = static_cast(1); + Result[3][2] = - static_cast(2) * zNear; return Result; } // Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf template - GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective - ( - T fovy, - T aspect, - T zNear, - T ep - ) + GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; - tmat4x4 Result(T(0)); + tmat4x4 Result(static_cast(0)); Result[0][0] = (static_cast(2) * zNear) / (right - left); Result[1][1] = (static_cast(2) * zNear) / (top - bottom); Result[2][2] = ep - static_cast(1); @@ -504,12 +430,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective(T fovy, T aspect, T zNear) { return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon()); } @@ -523,16 +444,16 @@ namespace glm tvec4 const & viewport ) { - tvec4 tmp = tvec4(obj, T(1)); + tvec4 tmp = tvec4(obj, static_cast(1)); tmp = model * tmp; tmp = proj * tmp; tmp /= tmp.w; # if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE - tmp.x = tmp.x * T(0.5) + T(0.5); - tmp.y = tmp.y * T(0.5) + T(0.5); + tmp.x = tmp.x * static_cast(0.5) + static_cast(0.5); + tmp.y = tmp.y * static_cast(0.5) + static_cast(0.5); # else - tmp = tmp * T(0.5) + T(0.5); + tmp = tmp * static_cast(0.5) + static_cast(0.5); # endif tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); @@ -555,10 +476,10 @@ namespace glm tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); # if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE - tmp.x = tmp.x * T(2) - T(1); - tmp.y = tmp.y * T(2) - T(1); + tmp.x = tmp.x * static_cast(2) - static_cast(1); + tmp.y = tmp.y * static_cast(2) - static_cast(1); # else - tmp = tmp * T(2) - T(1); + tmp = tmp * static_cast(2) - static_cast(1); # endif tvec4 obj = Inverse * tmp; @@ -568,36 +489,26 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 pickMatrix - ( - tvec2 const & center, - tvec2 const & delta, - tvec4 const & viewport - ) + GLM_FUNC_QUALIFIER tmat4x4 pickMatrix(tvec2 const & center, tvec2 const & delta, tvec4 const & viewport) { - assert(delta.x > T(0) && delta.y > T(0)); - tmat4x4 Result(1.0f); + assert(delta.x > static_cast(0) && delta.y > static_cast(0)); + tmat4x4 Result(static_cast(1)); - if(!(delta.x > T(0) && delta.y > T(0))) + if(!(delta.x > static_cast(0) && delta.y > static_cast(0))) return Result; // Error tvec3 Temp( - (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, - (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, - T(0)); + (static_cast(viewport[2]) - static_cast(2) * (center.x - static_cast(viewport[0]))) / delta.x, + (static_cast(viewport[3]) - static_cast(2) * (center.y - static_cast(viewport[1]))) / delta.y, + static_cast(0)); // Translate and scale the picked region to the entire window Result = translate(Result, Temp); - return scale(Result, tvec3(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); + return scale(Result, tvec3(static_cast(viewport[2]) / delta.x, static_cast(viewport[3]) / delta.y, static_cast(1))); } template - GLM_FUNC_QUALIFIER tmat4x4 lookAt - ( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up - ) + GLM_FUNC_QUALIFIER tmat4x4 lookAt(tvec3 const & eye, tvec3 const & center, tvec3 const & up) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return lookAtLH(eye, center, up); diff --git a/glm/gtc/noise.hpp b/glm/gtc/noise.hpp index d31a0e42..aec4f18d 100644 --- a/glm/gtc/noise.hpp +++ b/glm/gtc/noise.hpp @@ -26,7 +26,7 @@ #include "../vec3.hpp" #include "../vec4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_noise extension included") #endif diff --git a/glm/gtc/packing.hpp b/glm/gtc/packing.hpp index a46081a7..1389d959 100644 --- a/glm/gtc/packing.hpp +++ b/glm/gtc/packing.hpp @@ -16,7 +16,7 @@ // Dependency: #include "type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_packing extension included") #endif diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 6a42bdf3..72d06037 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -21,7 +21,7 @@ #include "../vec4.hpp" #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_quaternion extension included") #endif diff --git a/glm/gtc/random.hpp b/glm/gtc/random.hpp index 250b5d0b..fa3956e5 100644 --- a/glm/gtc/random.hpp +++ b/glm/gtc/random.hpp @@ -18,7 +18,7 @@ #include "../vec2.hpp" #include "../vec3.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_random extension included") #endif diff --git a/glm/gtc/reciprocal.hpp b/glm/gtc/reciprocal.hpp index 6b18db7a..c14a4fec 100644 --- a/glm/gtc/reciprocal.hpp +++ b/glm/gtc/reciprocal.hpp @@ -15,7 +15,7 @@ // Dependencies #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_reciprocal extension included") #endif diff --git a/glm/gtc/round.hpp b/glm/gtc/round.hpp index 45a97595..a5835921 100644 --- a/glm/gtc/round.hpp +++ b/glm/gtc/round.hpp @@ -21,7 +21,7 @@ #include "../common.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_integer extension included") #endif diff --git a/glm/gtc/type_aligned.hpp b/glm/gtc/type_aligned.hpp index 0a75dd04..2e4503c3 100644 --- a/glm/gtc/type_aligned.hpp +++ b/glm/gtc/type_aligned.hpp @@ -9,15 +9,15 @@ /// @brief Aligned types. /// need to be included to use these features. +#pragma once + #if !GLM_HAS_ALIGNED_TYPE # error "GLM: Aligned types are not supported on this platform" #endif -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_type_aligned extension included") #endif -#pragma once - #include "../vec2.hpp" #include "../vec3.hpp" #include "../vec4.hpp" diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index 8b920b19..a2dbb66a 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -33,7 +33,7 @@ #include "../mat4x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_type_precision extension included") #endif diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index b171dd95..008665e2 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -49,7 +49,7 @@ #include "../mat4x4.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_type_ptr extension included") #endif diff --git a/glm/gtc/ulp.hpp b/glm/gtc/ulp.hpp index 632f4a35..a82fa4e7 100644 --- a/glm/gtc/ulp.hpp +++ b/glm/gtc/ulp.hpp @@ -18,7 +18,7 @@ #include "../detail/precision.hpp" #include "../detail/type_int.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_ulp extension included") #endif diff --git a/glm/gtc/vec1.hpp b/glm/gtc/vec1.hpp index 02479181..f84ff97c 100644 --- a/glm/gtc/vec1.hpp +++ b/glm/gtc/vec1.hpp @@ -15,7 +15,7 @@ #include "../glm.hpp" #include "../detail/type_vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_vec1 extension included") #endif diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index e5aa6c28..eb9d7210 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_associated_min_max extension included") #endif diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp index b07b4b65..17378f35 100644 --- a/glm/gtx/bit.hpp +++ b/glm/gtx/bit.hpp @@ -16,7 +16,7 @@ // Dependencies #include "../gtc/bitfield.hpp" -#if(defined(GLM_MESSAGES)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead") #endif diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index ab720d5c..8d435b81 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_closest_point extension included") #endif diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index c814638e..9ff08dce 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_color_space extension included") #endif diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index 01c1e429..428ca6d2 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") #endif diff --git a/glm/gtx/common.hpp b/glm/gtx/common.hpp index 8d7d3291..6533a54e 100644 --- a/glm/gtx/common.hpp +++ b/glm/gtx/common.hpp @@ -19,7 +19,7 @@ #include "../vec4.hpp" #include "../gtc/vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_common extension included") #endif diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 8b194bc9..9f4819ae 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -17,13 +17,13 @@ #include "../glm.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_compatibility extension included") #endif -#if(GLM_COMPILER & GLM_COMPILER_VC) +#if GLM_COMPILER & GLM_COMPILER_VC # include -#elif(GLM_COMPILER & GLM_COMPILER_GCC) +#elif GLM_COMPILER & GLM_COMPILER_GCC # include # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # undef isfinite diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index 7d6265b7..c316f9e2 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -18,7 +18,7 @@ #include "../detail/setup.hpp" #include "../detail/precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_component_wise extension included") #endif diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 27febf98..a64c7df7 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -21,7 +21,7 @@ #include "../gtc/constants.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_dual_quaternion extension included") #endif diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index 13e6dd3d..fdc4f26c 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_euler_angles extension included") #endif diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index dbd49747..26837a83 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extend extension included") #endif diff --git a/glm/gtx/extended_min_max.hpp b/glm/gtx/extended_min_max.hpp index 7d10dbc2..f4d88595 100644 --- a/glm/gtx/extended_min_max.hpp +++ b/glm/gtx/extended_min_max.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extented_min_max extension included") #endif diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index 126e0791..ed64a27d 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_exponential extension included") #endif diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index e83fa4e6..35aa7f3b 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -19,7 +19,7 @@ #include "../exponential.hpp" #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_square_root extension included") #endif diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp index 6d222130..ccb1d227 100644 --- a/glm/gtx/fast_trigonometry.hpp +++ b/glm/gtx/fast_trigonometry.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_trigonometry extension included") #endif diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index c080caa8..de1f18d3 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -16,7 +16,7 @@ #include "../glm.hpp" #include "../gtx/optimum_pow.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_gradient_paint extension included") #endif diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index b13ade83..2ee5175e 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") #endif diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp index 9bab73c3..1173a58e 100644 --- a/glm/gtx/integer.hpp +++ b/glm/gtx/integer.hpp @@ -16,7 +16,7 @@ #include "../glm.hpp" #include "../gtc/integer.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_integer extension included") #endif diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index 146b6281..33b6e99b 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -21,7 +21,7 @@ #include "../gtx/closest_point.hpp" #include "../gtx/vector_query.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_closest_point extension included") #endif diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index e79f6ddf..52b27a8f 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -23,7 +23,7 @@ #include "../glm.hpp" #include "../gtx/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_io extension included") #endif diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index dfed8b06..7958fc3e 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_log_base extension included") #endif diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 9f1dcaa5..d920f4ef 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") #endif diff --git a/glm/gtx/matrix_decompose.hpp b/glm/gtx/matrix_decompose.hpp index 233b9e8c..e163f5a3 100644 --- a/glm/gtx/matrix_decompose.hpp +++ b/glm/gtx/matrix_decompose.hpp @@ -20,7 +20,7 @@ #include "../gtc/quaternion.hpp" #include "../gtc/matrix_transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_decompose extension included") #endif diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index ef4d8b10..77a69eac 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_interpolation extension included") #endif diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 3bf2f223..9402abee 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_major_storage extension included") #endif diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index d6f7a9ea..3192ae54 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_operation extension included") #endif diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index f8f486af..25182741 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -18,7 +18,7 @@ #include "../gtx/vector_query.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_query extension included") #endif diff --git a/glm/gtx/matrix_transform_2d.hpp b/glm/gtx/matrix_transform_2d.hpp index afc53a0c..91f4834e 100644 --- a/glm/gtx/matrix_transform_2d.hpp +++ b/glm/gtx/matrix_transform_2d.hpp @@ -18,7 +18,7 @@ #include "../vec2.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_transform_2d extension included") #endif diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index a2b08ede..65861f72 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_mixed_product extension included") #endif diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index 209ca644..b3cb5283 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -17,7 +17,7 @@ #include "../detail/func_geometric.hpp" #include "../gtx/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_norm extension included") #endif diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 5c7efddd..2e0044e3 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_normal extension included") #endif diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp index b207555e..de650d30 100644 --- a/glm/gtx/normalize_dot.hpp +++ b/glm/gtx/normalize_dot.hpp @@ -16,7 +16,7 @@ // Dependency: #include "../gtx/fast_square_root.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_normalize_dot extension included") #endif diff --git a/glm/gtx/number_precision.hpp b/glm/gtx/number_precision.hpp index 13f6ade2..736d0351 100644 --- a/glm/gtx/number_precision.hpp +++ b/glm/gtx/number_precision.hpp @@ -18,7 +18,7 @@ #include "../glm.hpp" #include "../gtc/type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_number_precision extension included") #endif diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index eced3cbe..e9510c41 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_optimum_pow extension included") #endif diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 2529dda5..4bea4497 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -18,7 +18,7 @@ #include "../mat3x3.hpp" #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_orthonormalize extension included") #endif diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp index 880ab04b..8b6260a9 100644 --- a/glm/gtx/perpendicular.hpp +++ b/glm/gtx/perpendicular.hpp @@ -17,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/projection.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_perpendicular extension included") #endif diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index a915544e..c647c0fa 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_polar_coordinates extension included") #endif diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp index aad3c879..fcddae87 100644 --- a/glm/gtx/projection.hpp +++ b/glm/gtx/projection.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_projection extension included") #endif diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index 69e8519b..674d7e75 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -19,7 +19,7 @@ #include "../gtc/quaternion.hpp" #include "../gtx/norm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_quaternion extension included") #endif diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index ba43c220..1a31e947 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -7,21 +7,13 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 cross - ( - tvec3 const & v, - tquat const & q - ) + GLM_FUNC_QUALIFIER tvec3 cross(tvec3 const& v, tquat const& q) { return inverse(q) * v; } template - GLM_FUNC_QUALIFIER tvec3 cross - ( - tquat const & q, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tvec3 cross(tquat const& q, tvec3 const& v) { return q * v; } @@ -51,25 +43,19 @@ namespace glm } template - GLM_FUNC_QUALIFIER tquat exp - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat exp(tquat const& q) { tvec3 u(q.x, q.y, q.z); - T Angle = glm::length(u); + T const Angle = glm::length(u); if (Angle < epsilon()) return tquat(); - tvec3 v(u / Angle); + tvec3 const v(u / Angle); return tquat(cos(Angle), sin(Angle) * v); } template - GLM_FUNC_QUALIFIER tquat log - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat log(tquat const& q) { tvec3 u(q.x, q.y, q.z); T Vec3Len = length(u); @@ -110,36 +96,25 @@ namespace glm T Angle = acos(x.w / magnitude); T NewAngle = Angle * y; T Div = sin(NewAngle) / sin(Angle); - T Mag = pow(magnitude, y-1); + T Mag = pow(magnitude, y - static_cast(1)); return tquat(cos(NewAngle) * magnitude * Mag, x.x * Div * Mag, x.y * Div * Mag, x.z * Div * Mag); } template - GLM_FUNC_QUALIFIER tvec3 rotate - ( - tquat const & q, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tvec3 rotate(tquat const& q, tvec3 const& v) { return q * v; } template - GLM_FUNC_QUALIFIER tvec4 rotate - ( - tquat const & q, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 rotate(tquat const& q, tvec4 const& v) { return q * v; } template - GLM_FUNC_QUALIFIER T extractRealComponent - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T extractRealComponent(tquat const& q) { T w = static_cast(1) - q.x * q.x - q.y * q.y - q.z * q.z; if(w < T(0)) @@ -149,21 +124,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER T length2 - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T length2(tquat const& q) { return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; } template - GLM_FUNC_QUALIFIER tquat shortMix - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat shortMix(tquat const& x, tquat const& y, T const& a) { if(a <= static_cast(0)) return x; if(a >= static_cast(1)) return y; @@ -200,22 +167,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tquat fastMix - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat fastMix(tquat const& x, tquat const& y, T const & a) { return glm::normalize(x * (static_cast(1) - a) + (y * a)); } template - GLM_FUNC_QUALIFIER tquat rotation - ( - tvec3 const & orig, - tvec3 const & dest - ) + GLM_FUNC_QUALIFIER tquat rotation(tvec3 const& orig, tvec3 const& dest) { T cosTheta = dot(orig, dest); tvec3 rotationAxis; diff --git a/glm/gtx/raw_data.hpp b/glm/gtx/raw_data.hpp index 0530e934..2625fd11 100644 --- a/glm/gtx/raw_data.hpp +++ b/glm/gtx/raw_data.hpp @@ -16,7 +16,7 @@ #include "../detail/setup.hpp" #include "../detail/type_int.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_raw_data extension included") #endif diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp index d5a9503d..f1dfa7b8 100644 --- a/glm/gtx/rotate_normalized_axis.hpp +++ b/glm/gtx/rotate_normalized_axis.hpp @@ -19,7 +19,7 @@ #include "../gtc/epsilon.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included") #endif diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index 85b67465..91d1784d 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -17,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_rotate_vector extension included") #endif diff --git a/glm/gtx/scalar_relational.hpp b/glm/gtx/scalar_relational.hpp index 171cfe71..96957165 100644 --- a/glm/gtx/scalar_relational.hpp +++ b/glm/gtx/scalar_relational.hpp @@ -15,7 +15,7 @@ // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extend extension included") #endif diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 4e256533..333a5bce 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -16,7 +16,7 @@ #include "../glm.hpp" #include "../gtx/optimum_pow.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_spline extension included") #endif diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp index 8b3cce76..ea1791b3 100644 --- a/glm/gtx/std_based_type.hpp +++ b/glm/gtx/std_based_type.hpp @@ -16,7 +16,7 @@ #include "../glm.hpp" #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_std_based_type extension included") #endif diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index 9558d278..d2b9fc6a 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -27,7 +27,7 @@ # error "GLM_GTX_string_cast is not supported on CUDA compiler" #endif -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_string_cast extension included") #endif diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index ee5309c9..365748b9 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -19,7 +19,7 @@ #include "../glm.hpp" #include "../gtc/matrix_transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_transform extension included") #endif diff --git a/glm/gtx/transform.inl b/glm/gtx/transform.inl index fc228ce8..516d8661 100644 --- a/glm/gtx/transform.inl +++ b/glm/gtx/transform.inl @@ -4,28 +4,21 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat4x4 translate( - tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 translate(tvec3 const & v) { - return translate( - tmat4x4(1.0f), v); + return translate(tmat4x4(static_cast(1)), v); } template - GLM_FUNC_QUALIFIER tmat4x4 rotate( - T angle, - tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 rotate(T angle, tvec3 const & v) { - return rotate( - tmat4x4(1), angle, v); + return rotate(tmat4x4(static_cast(1)), angle, v); } template - GLM_FUNC_QUALIFIER tmat4x4 scale( - tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 scale(tvec3 const & v) { - return scale( - tmat4x4(1.0f), v); + return scale(tmat4x4(static_cast(1)), v); } }//namespace glm diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index c1973b9e..bf5fbc9e 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -17,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_transform2 extension included") #endif diff --git a/glm/gtx/transform2.inl b/glm/gtx/transform2.inl index 038bd956..b65bd3db 100644 --- a/glm/gtx/transform2.inl +++ b/glm/gtx/transform2.inl @@ -4,9 +4,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat3x3 shearX2D( - const tmat3x3& m, - T s) + GLM_FUNC_QUALIFIER tmat3x3 shearX2D(tmat3x3 const& m, T s) { tmat3x3 r(1); r[0][1] = s; @@ -14,9 +12,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 shearY2D( - const tmat3x3& m, - T s) + GLM_FUNC_QUALIFIER tmat3x3 shearY2D(tmat3x3 const& m, T s) { tmat3x3 r(1); r[1][0] = s; @@ -24,10 +20,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 shearX3D( - const tmat4x4& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4 shearX3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); r[1][0] = s; @@ -36,10 +29,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 shearY3D( - const tmat4x4& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4 shearY3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); r[0][1] = s; @@ -48,10 +38,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 shearZ3D( - const tmat4x4& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4 shearZ3D(tmat4x4 const& m, T s, T t) { tmat4x4 r(1); r[0][2] = s; @@ -60,35 +47,31 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 reflect2D( - const tmat3x3& m, - const tvec3& normal) + GLM_FUNC_QUALIFIER tmat3x3 reflect2D(tmat3x3 const& m, tvec3 const& normal) { - tmat3x3 r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; + tmat3x3 r(static_cast(1)); + r[0][0] = static_cast(1) - static_cast(2) * normal.x * normal.x; + r[0][1] = -static_cast(2) * normal.x * normal.y; + r[1][0] = -static_cast(2) * normal.x * normal.y; + r[1][1] = static_cast(1) - static_cast(2) * normal.y * normal.y; return m * r; } template - GLM_FUNC_QUALIFIER tmat4x4 reflect3D( - const tmat4x4& m, - const tvec3& normal) + GLM_FUNC_QUALIFIER tmat4x4 reflect3D(tmat4x4 const& m, tvec3 const& normal) { - tmat4x4 r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[0][2] = -2 * normal.x * normal.z; + tmat4x4 r(static_cast(1)); + r[0][0] = static_cast(1) - static_cast(2) * normal.x * normal.x; + r[0][1] = -static_cast(2) * normal.x * normal.y; + r[0][2] = -static_cast(2) * normal.x * normal.z; - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; - r[1][2] = -2 * normal.y * normal.z; + r[1][0] = -static_cast(2) * normal.x * normal.y; + r[1][1] = static_cast(1) - static_cast(2) * normal.y * normal.y; + r[1][2] = -static_cast(2) * normal.y * normal.z; - r[2][0] = -2 * normal.x * normal.z; - r[2][1] = -2 * normal.y * normal.z; - r[2][2] = 1 - 2 * normal.z * normal.z; + r[2][0] = -static_cast(2) * normal.x * normal.z; + r[2][1] = -static_cast(2) * normal.y * normal.z; + r[2][2] = static_cast(1) - static_cast(2) * normal.z * normal.z; return m * r; } @@ -97,11 +80,11 @@ namespace glm const tmat3x3& m, const tvec3& normal) { - tmat3x3 r(1); - r[0][0] = 1 - normal.x * normal.x; + tmat3x3 r(static_cast(1)); + r[0][0] = static_cast(1) - normal.x * normal.x; r[0][1] = - normal.x * normal.y; r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; + r[1][1] = static_cast(1) - normal.y * normal.y; return m * r; } @@ -110,26 +93,24 @@ namespace glm const tmat4x4& m, const tvec3& normal) { - tmat4x4 r(1); - r[0][0] = 1 - normal.x * normal.x; + tmat4x4 r(static_cast(1)); + r[0][0] = static_cast(1) - normal.x * normal.x; r[0][1] = - normal.x * normal.y; r[0][2] = - normal.x * normal.z; r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; + r[1][1] = static_cast(1) - normal.y * normal.y; r[1][2] = - normal.y * normal.z; r[2][0] = - normal.x * normal.z; r[2][1] = - normal.y * normal.z; - r[2][2] = 1 - normal.z * normal.z; + r[2][2] = static_cast(1) - normal.z * normal.z; return m * r; } template - GLM_FUNC_QUALIFIER tmat4x4 scaleBias( - T scale, - T bias) + GLM_FUNC_QUALIFIER tmat4x4 scaleBias(T scale, T bias) { tmat4x4 result; - result[3] = tvec4(tvec3(bias), T(1)); + result[3] = tvec4(tvec3(bias), static_cast(1)); result[0][0] = scale; result[1][1] = scale; result[2][2] = scale; @@ -137,10 +118,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 scaleBias( - const tmat4x4& m, - T scale, - T bias) + GLM_FUNC_QUALIFIER tmat4x4 scaleBias(tmat4x4 const& m, T scale, T bias) { return m * scaleBias(scale, bias); } diff --git a/glm/gtx/type_aligned.hpp b/glm/gtx/type_aligned.hpp index 39446cfe..8962a6f8 100644 --- a/glm/gtx/type_aligned.hpp +++ b/glm/gtx/type_aligned.hpp @@ -18,7 +18,7 @@ // Dependency: #include "../gtc/type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_type_aligned extension included") #endif diff --git a/glm/gtx/type_trait.hpp b/glm/gtx/type_trait.hpp index 2e703d1b..0207a06d 100644 --- a/glm/gtx/type_trait.hpp +++ b/glm/gtx/type_trait.hpp @@ -28,7 +28,7 @@ #include "../gtc/quaternion.hpp" #include "../gtx/dual_quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_type_trait extension included") #endif diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index 99398c14..d52d3f83 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -20,7 +20,7 @@ #include "../gtx/quaternion.hpp" #include "../gtx/rotate_vector.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_vector_angle extension included") #endif diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 3e21014b..2c0d0227 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -17,7 +17,7 @@ #include #include -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_vector_query extension included") #endif diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp index 146088f5..00600732 100644 --- a/glm/gtx/wrap.hpp +++ b/glm/gtx/wrap.hpp @@ -16,7 +16,7 @@ #include "../glm.hpp" #include "../gtc/vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_wrap extension included") #endif diff --git a/glm/simd/platform.h b/glm/simd/platform.h index 9a3ef72a..85eb4b5a 100644 --- a/glm/simd/platform.h +++ b/glm/simd/platform.h @@ -43,7 +43,7 @@ #endif// // Report platform detection -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED) # define GLM_MESSAGE_PLATFORM_DISPLAYED # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO) # pragma message("GLM: QNX platform detected") diff --git a/readme.md b/readme.md index 5b8391d1..e1a5cb2c 100644 --- a/readme.md +++ b/readme.md @@ -80,6 +80,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Added GTC_functions extension - Added quaternion version of isnan and isinf #521 - Added lowestBitValue to GTX_bit #536 +- Added GLM_FORCE_UNRESTRICTED_GENTYPE allowing non basic genType #543 ##### Improvements: - Improved SIMD and swizzle operators interactions with GCC and Clang #474 @@ -95,6 +96,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Use Cuda built-in function for abs function implementation with Cuda compiler - Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG - No more warnings for use of long long +- Added more information to build messages ##### Fixes: - Fixed GTX_extended_min_max filename typo #386 @@ -111,6 +113,8 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Deprecated GLM_GTX_simd_vec4 extension - Deprecated GLM_GTX_simd_mat4 extension - Deprecated GLM_GTX_simd_quat extension +- Deprecated GLM_SWIZZLE, use GLM_FORCE_SWIZZLE instead +- Deprecated GLM_MESSAGES, use GLM_FORCE_MESSAGES instead -------------------------------------------------------------------------------- #### [GLM 0.9.7.6](https://github.com/g-truc/glm/releases/tag/0.9.7.6) - 2016-07-16 diff --git a/test/core/core_func_integer.cpp b/test/core/core_func_integer.cpp index 49f8dbee..c44153d8 100644 --- a/test/core/core_func_integer.cpp +++ b/test/core/core_func_integer.cpp @@ -529,8 +529,8 @@ namespace bitfieldReverse { int Error = 0; - Error += perf32(Samples); - Error += perf64(Samples); + Error += perf32(static_cast(Samples)); + Error += perf64(static_cast(Samples)); return Error; } @@ -1459,7 +1459,7 @@ namespace bitCount // bitCount - TimeIf { for(std::size_t i = 0, n = v.size(); i < n; ++i) - v[i] = bitCount_if(i); + v[i] = bitCount_if(static_cast(i)); } std::clock_t TimestampsB = std::clock(); diff --git a/test/core/core_func_swizzle.cpp b/test/core/core_func_swizzle.cpp index 09fc0f3f..dfd6c8af 100644 --- a/test/core/core_func_swizzle.cpp +++ b/test/core/core_func_swizzle.cpp @@ -1,5 +1,5 @@ -#define GLM_MESSAGES -#define GLM_SWIZZLE +#define GLM_FORCE_MESSAGES +#define GLM_FORCE_SWIZZLE #include int test_ivec2_swizzle() diff --git a/test/core/core_setup_message.cpp b/test/core/core_setup_message.cpp index 2aae3940..7eaf7028 100644 --- a/test/core/core_setup_message.cpp +++ b/test/core/core_setup_message.cpp @@ -1,4 +1,4 @@ -#define GLM_MESSAGES +#define GLM_FORCE_MESSAGES #include #include diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index a023de6e..9177e380 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -1,4 +1,4 @@ -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include #include #include @@ -65,7 +65,7 @@ int test_vec1_ctor() } #endif */ -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(1.0f, 2.0f); glm::vec2 B = A.xy; @@ -76,7 +76,7 @@ int test_vec1_ctor() Error += glm::all(glm::equal(A, C)) ? 0 : 1; Error += glm::all(glm::equal(A, D)) ? 0 : 1; } -#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(2.0f); diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index 48da72a2..af7997af 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -1,4 +1,4 @@ -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include #include #include @@ -230,7 +230,7 @@ int test_vec2_ctor() } #endif -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(1.0f, 2.0f); glm::vec2 B = A.xy; @@ -241,7 +241,7 @@ int test_vec2_ctor() Error += glm::all(glm::equal(A, C)) ? 0 : 1; Error += glm::all(glm::equal(A, D)) ? 0 : 1; } -#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(2.0f); diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index cbce6ba2..e6b894c7 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -1,4 +1,4 @@ -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include #include #include @@ -40,7 +40,7 @@ int test_vec3_ctor() } #endif -#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)) { glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f); glm::vec3 B = A.xyz; @@ -59,7 +59,7 @@ int test_vec3_ctor() Error += glm::all(glm::equal(A, G)) ? 0 : 1; Error += glm::all(glm::equal(A, H)) ? 0 : 1; } -#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)) { glm::vec3 A(1); diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 4d78c7d7..86e302c7 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -1,5 +1,5 @@ #define GLM_FORCE_ALIGNED -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include #include #include @@ -68,7 +68,7 @@ int test_vec4_ctor() } #endif -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f); glm::vec4 B = A.xyzw; @@ -97,7 +97,7 @@ int test_vec4_ctor() Error += glm::all(glm::equal(A, L)) ? 0 : 1; Error += glm::all(glm::equal(A, M)) ? 0 : 1; } -#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec4 A(1); diff --git a/test/gtc/gtc_type_aligned.cpp b/test/gtc/gtc_type_aligned.cpp index 351a3958..a3ba7b81 100644 --- a/test/gtc/gtc_type_aligned.cpp +++ b/test/gtc/gtc_type_aligned.cpp @@ -1,4 +1,4 @@ -#define GLM_MESSAGES +#define GLM_FORCE_MESSAGES #include #if GLM_HAS_ALIGNED_TYPE