mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Merge pull request #1026 from manylegged/master
make GLM_CONFIG_XYZW_ONLY work with GLM_SWIZZLE_FUNCTION #1026
This commit is contained in:
commit
45271404e6
@ -447,16 +447,12 @@
|
|||||||
#define GLM_SWIZZLE_OPERATOR 1
|
#define GLM_SWIZZLE_OPERATOR 1
|
||||||
#define GLM_SWIZZLE_FUNCTION 2
|
#define GLM_SWIZZLE_FUNCTION 2
|
||||||
|
|
||||||
#if defined(GLM_FORCE_XYZW_ONLY)
|
|
||||||
# undef GLM_FORCE_SWIZZLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(GLM_SWIZZLE)
|
#if defined(GLM_SWIZZLE)
|
||||||
# pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead.")
|
# pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead.")
|
||||||
# define GLM_FORCE_SWIZZLE
|
# define GLM_FORCE_SWIZZLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
|
#if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG) && !defined(GLM_FORCE_XYZW_ONLY)
|
||||||
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
|
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
|
||||||
#elif defined(GLM_FORCE_SWIZZLE)
|
#elif defined(GLM_FORCE_SWIZZLE)
|
||||||
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
|
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
|
||||||
|
@ -40,6 +40,9 @@ namespace glm
|
|||||||
|
|
||||||
# if GLM_CONFIG_XYZW_ONLY
|
# if GLM_CONFIG_XYZW_ONLY
|
||||||
T x, y;
|
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
|
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
@ -43,6 +43,9 @@ namespace glm
|
|||||||
|
|
||||||
# if GLM_CONFIG_XYZW_ONLY
|
# if GLM_CONFIG_XYZW_ONLY
|
||||||
T x, y, z;
|
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
|
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,9 @@ namespace glm
|
|||||||
|
|
||||||
# if GLM_CONFIG_XYZW_ONLY
|
# if GLM_CONFIG_XYZW_ONLY
|
||||||
T x, y, z, w;
|
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
|
# elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user