make GLM_CONFIG_XYZW_ONLY work with GLM_SWIZZLE_FUNCTION

This commit is contained in:
Arthur Danskin 2020-06-29 01:54:26 -04:00
parent 23e0701c04
commit 3b3db0fc5a
4 changed files with 12 additions and 3 deletions

View File

@ -447,9 +447,9 @@
#define GLM_SWIZZLE_OPERATOR 1
#define GLM_SWIZZLE_FUNCTION 2
#if defined(GLM_FORCE_XYZW_ONLY)
# undef GLM_FORCE_SWIZZLE
#endif
//#if defined(GLM_FORCE_XYZW_ONLY)
//# undef GLM_FORCE_SWIZZLE
//#endif
#if defined(GLM_SWIZZLE)
# pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead.")

View File

@ -40,6 +40,9 @@ namespace glm
# if GLM_CONFIG_XYZW_ONLY
T x, y;
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, Q, x, y)
# endif//GLM_CONFIG_SWIZZLE
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
union
{

View File

@ -43,6 +43,9 @@ namespace glm
# if GLM_CONFIG_XYZW_ONLY
T x, y, z;
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, Q, x, y, z)
# endif//GLM_CONFIG_SWIZZLE
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
union
{

View File

@ -40,6 +40,9 @@ namespace glm
# if GLM_CONFIG_XYZW_ONLY
T x, y, z, w;
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, Q, x, y, z, w)
# endif//GLM_CONFIG_SWIZZLE
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
union
{