mirror of
https://github.com/g-truc/glm.git
synced 2024-11-12 21:31:47 +00:00
Fixed condition to enable half vector specialization
This commit is contained in:
parent
146eacb067
commit
66a8720bc0
@ -442,7 +442,7 @@
|
|||||||
(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
|
(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
|
||||||
|
|
||||||
#define GLM_SUPPORT_SWIZZLE_OPERATOR() \
|
#define GLM_SUPPORT_SWIZZLE_OPERATOR() \
|
||||||
(defined(GLM_SWIZZLE) && GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
(/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||||
|
|
||||||
#define GLM_SUPPORT_SWIZZLE_FUNCTION() defined(GLM_SWIZZLE)
|
#define GLM_SUPPORT_SWIZZLE_FUNCTION() defined(GLM_SWIZZLE)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
#if(!GLM_SUPPORT_SWIZZLE_OPERATOR())
|
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||||
template <>
|
template <>
|
||||||
struct tvec2<thalf>
|
struct tvec2<thalf>
|
||||||
{
|
{
|
||||||
@ -345,7 +345,7 @@ namespace detail
|
|||||||
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||||
tref4<thalf> swizzle(comp X, comp Y, comp Z, comp W);
|
tref4<thalf> swizzle(comp X, comp Y, comp Z, comp W);
|
||||||
};
|
};
|
||||||
#endif//(!GLM_SUPPORT_SWIZZLE_OPERATOR())
|
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||||
}
|
}
|
||||||
//namespace detail
|
//namespace detail
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
#if(!GLM_SUPPORT_SWIZZLE_OPERATOR())
|
#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// hvec2
|
// hvec2
|
||||||
@ -1003,7 +1003,7 @@ namespace detail
|
|||||||
(*this)[w]);
|
(*this)[w]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif//(!GLM_SUPPORT_SWIZZLE_OPERATOR())
|
#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
//#define GLM_FORCE_PURE
|
//#define GLM_FORCE_PURE
|
||||||
#define GLM_MESSAGES
|
#define GLM_MESSAGES
|
||||||
#define GLM_SWIZZLE
|
#define GLM_SWIZZLE
|
||||||
//#define GLM_FORCE_CXX98
|
#define GLM_FORCE_CXX98
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
int test_vec2_swizzle()
|
int test_vec2_swizzle()
|
||||||
@ -24,6 +24,7 @@ int test_vec2_swizzle()
|
|||||||
C.xy() = B.xy();
|
C.xy() = B.xy();
|
||||||
|
|
||||||
Error += A == B ? 0 : 1;
|
Error += A == B ? 0 : 1;
|
||||||
|
Error += A == C ? 0 : 1;
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
@ -38,6 +39,7 @@ int test_vec3_swizzle()
|
|||||||
C.xyz() = B.xyz();
|
C.xyz() = B.xyz();
|
||||||
|
|
||||||
Error += A == B ? 0 : 1;
|
Error += A == B ? 0 : 1;
|
||||||
|
Error += A == C ? 0 : 1;
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
@ -52,6 +54,7 @@ int test_vec4_swizzle()
|
|||||||
C.xyzw() = B.xyzw();
|
C.xyzw() = B.xyzw();
|
||||||
|
|
||||||
Error += A == B ? 0 : 1;
|
Error += A == B ? 0 : 1;
|
||||||
|
Error += A == C ? 0 : 1;
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user