mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Fixed swizzle functions for single component name mode of vector types
This commit is contained in:
parent
4843f8ffb9
commit
212e1a1f07
@ -67,8 +67,8 @@ namespace detail
|
||||
|
||||
# ifdef GLM_SWIZZLE_OPERATOR
|
||||
// Defines all he swizzle operator as functions
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC2(value_type, detail::tvec2, detail::tref2)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(value_type, detail::tvec2, detail::tref2, x, y)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4, x, y)
|
||||
# endif//GLM_SWIZZLE_OPERATOR
|
||||
# elif((GLM_LANG == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
|
||||
union
|
||||
|
@ -73,8 +73,8 @@ namespace detail
|
||||
|
||||
# ifdef GLM_SWIZZLE_OPERATOR
|
||||
// Defines all he swizzle operator as functions
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, detail::tvec3, detail::tref2, detail::tref3, x, y, z)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z)
|
||||
# endif//GLM_SWIZZLE_OPERATOR
|
||||
# elif((GLM_LANG == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
|
||||
union
|
||||
|
@ -67,8 +67,8 @@ namespace detail
|
||||
|
||||
# ifdef GLM_SWIZZLE_OPERATOR
|
||||
// Defines all he swizzle operator as functions
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4, x, y, z, w)
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z, w)
|
||||
# endif//GLM_SWIZZLE_OPERATOR
|
||||
# elif((GLM_LANG == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
|
||||
union
|
||||
|
@ -7,6 +7,7 @@
|
||||
// File : test/core/core_func_swizzle.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_FORCE_ONLY_XYZW
|
||||
#define GLM_MESSAGES
|
||||
#define GLM_SWIZZLE_OPERATOR
|
||||
//#define GLM_FORCE_CXX11
|
||||
|
Loading…
Reference in New Issue
Block a user