Created
November 17, 2015 23:02
-
-
Save kioba/0c45259cff86dad23fff to your computer and use it in GitHub Desktop.
GLM::vec4 union names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) | |
value_type x, y, z, w; | |
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT) | |
union | |
{ | |
struct{value_type x, y, z, w;}; | |
struct{value_type r, g, b, a;}; | |
struct{value_type s, t, p, q;}; | |
}; | |
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) | |
union {value_type x, r, s;}; | |
union {value_type y, g, t;}; | |
union {value_type z, b, p;}; | |
union {value_type w, a, q;}; | |
# endif//GLM_COMPONENT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment