Enabled swizzle operator by default, removed GLM_SWIZZLE and add GLM_SWIZZLE_RELAX for Visual C++ lang extension implementation.
This commit is contained in:
@@ -56,7 +56,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE_RELAX))
|
||||
union
|
||||
{
|
||||
struct{ T x, y; };
|
||||
@@ -77,10 +77,7 @@ namespace detail
|
||||
union {T x, r, s;};
|
||||
union {T y, g, t;};
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC2(T, P, detail::tvec2, detail::tref2)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//GLM_LANG
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE_RELAX))
|
||||
union
|
||||
{
|
||||
struct{ T x, y, z; };
|
||||
@@ -78,10 +78,7 @@ namespace detail
|
||||
union { T y, g, t; };
|
||||
union { T z, b, p; };
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, P, detail::tvec3, detail::tref2, detail::tref3)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//GLM_LANG
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE_RELAX))
|
||||
union
|
||||
{
|
||||
struct { T r, g, b, a; };
|
||||
@@ -79,10 +79,7 @@ namespace detail
|
||||
union { T z, b, p; };
|
||||
union { T w, a, q; };
|
||||
|
||||
# if(defined(GLM_SWIZZLE))
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, P, detail::tvec4, detail::tref2, detail::tref3, detail::tref4)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//(defined(GLM_SWIZZLE))
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
# endif//GLM_LANG
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user