mirror of
https://github.com/g-truc/glm.git
synced 2024-11-15 06:24:34 +00:00
5c1da05b7d
- Add simd aligned_vec3 (and sse aligned_dvec3 - 2 x xmm) - Fast packed_vec3 <=> aligned_vec3 and packed_vec4 <=> aligned_vec4 conversion - Fast aligned_vec3 <=> aligned_vec4 conversion - Optimized aligned_mat x aligned_mat and aligned_mat x aligned_vec - Inverse aligned_mat3 simd version (actually slower than ssid on my computer even it has 30% less instruction ?)
32 lines
421 B
C++
32 lines
421 B
C++
#include <glm/glm.hpp>
|
|
|
|
#if GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
|
|
struct vec2;
|
|
|
|
struct swizzleStruct
|
|
{
|
|
char _buffer[1];
|
|
};
|
|
|
|
struct vec2
|
|
{
|
|
GLM_CONSTEXPR vec2() :
|
|
x(0), y(0)
|
|
{}
|
|
|
|
union
|
|
{
|
|
struct { float x, y; };
|
|
struct { swizzleStruct xx; };
|
|
};
|
|
};
|
|
#endif
|
|
|
|
// Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler.
|
|
// vec2 Bar;
|
|
|
|
int main()
|
|
{
|
|
return 0;
|
|
}
|