|
|
@@ -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<T, sizeof(T) * 4, detail::is_aligned<P>::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<U, Q> const& v);
|
|
|
|
|
|
// -- Swizzle constructors --
|
|
|
-# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
|
|
+# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
|
|
template <int E0, int E1, int E2, int E3>
|
|
|
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<T, P>(x, v());
|
|
|
}
|
|
|
-# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
|
|
+# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
|
|
|
|
|
// -- Unary arithmetic operators --
|
|
|
|