12 template<std::
size_t N>
struct aligned {};
13 template<> GLM_ALIGNED_STRUCT(1) aligned<1>{};
14 template<> GLM_ALIGNED_STRUCT(2) aligned<2>{};
15 template<> GLM_ALIGNED_STRUCT(4) aligned<4>{};
16 template<> GLM_ALIGNED_STRUCT(8) aligned<8>{};
17 template<> GLM_ALIGNED_STRUCT(16) aligned<16>{};
18 template<> GLM_ALIGNED_STRUCT(32) aligned<32>{};
19 template<> GLM_ALIGNED_STRUCT(64) aligned<64>{};
21 template <
typename T, std::
size_t size,
bool aligned>
29 template <
typename T, std::
size_t size>
30 struct storage<T, size, true>
32 struct type : aligned<size>
38 # if GLM_ARCH & GLM_ARCH_SSE2_BIT
40 struct storage<float, 16, true>
42 typedef glm_vec4 type;
46 struct storage<int, 16, true>
48 typedef glm_ivec4 type;
52 struct storage<unsigned int, 16, true>
54 typedef glm_uvec4 type;
83 # if (GLM_ARCH & GLM_ARCH_AVX_BIT)
85 struct storage<double, 32, true>
87 typedef glm_dvec4 type;
91 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT)
93 struct storage<int64, 32, true>
95 typedef glm_i64vec4 type;
99 struct storage<uint64, 32, true>
101 typedef glm_u64vec4 type;
106 template <
typename T, precision P>
struct tvec1;
107 template <
typename T, precision P>
struct tvec2;
108 template <
typename T, precision P>
struct tvec3;
109 template <
typename T, precision P>
struct tvec4;
111 typedef tvec1<float, highp> highp_vec1_t;
112 typedef tvec1<float, mediump> mediump_vec1_t;
113 typedef tvec1<float, lowp> lowp_vec1_t;
114 typedef tvec1<double, highp> highp_dvec1_t;
115 typedef tvec1<double, mediump> mediump_dvec1_t;
116 typedef tvec1<double, lowp> lowp_dvec1_t;
117 typedef tvec1<int, highp> highp_ivec1_t;
118 typedef tvec1<int, mediump> mediump_ivec1_t;
119 typedef tvec1<int, lowp> lowp_ivec1_t;
120 typedef tvec1<uint, highp> highp_uvec1_t;
121 typedef tvec1<uint, mediump> mediump_uvec1_t;
122 typedef tvec1<uint, lowp> lowp_uvec1_t;
123 typedef tvec1<bool, highp> highp_bvec1_t;
124 typedef tvec1<bool, mediump> mediump_bvec1_t;
125 typedef tvec1<bool, lowp> lowp_bvec1_t;
444 #if(defined(GLM_PRECISION_LOWP_FLOAT))
445 typedef lowp_vec2
vec2;
446 typedef lowp_vec3
vec3;
447 typedef lowp_vec4
vec4;
448 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
449 typedef mediump_vec2
vec2;
450 typedef mediump_vec3
vec3;
451 typedef mediump_vec4
vec4;
452 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
453 typedef highp_vec2
vec2;
467 #endif//GLM_PRECISION
471 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
472 typedef lowp_dvec2
dvec2;
473 typedef lowp_dvec3
dvec3;
474 typedef lowp_dvec4
dvec4;
475 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
476 typedef mediump_dvec2
dvec2;
477 typedef mediump_dvec3
dvec3;
478 typedef mediump_dvec4
dvec4;
479 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
480 typedef highp_dvec2
dvec2;
494 #endif//GLM_PRECISION
498 #if(defined(GLM_PRECISION_LOWP_INT))
499 typedef lowp_ivec2
ivec2;
500 typedef lowp_ivec3
ivec3;
501 typedef lowp_ivec4
ivec4;
502 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
503 typedef mediump_ivec2
ivec2;
504 typedef mediump_ivec3
ivec3;
505 typedef mediump_ivec4
ivec4;
506 #else //defined(GLM_PRECISION_HIGHP_INT)
507 typedef highp_ivec2
ivec2;
521 #endif//GLM_PRECISION
525 #if(defined(GLM_PRECISION_LOWP_UINT))
526 typedef lowp_uvec2
uvec2;
527 typedef lowp_uvec3
uvec3;
528 typedef lowp_uvec4
uvec4;
529 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
530 typedef mediump_uvec2
uvec2;
531 typedef mediump_uvec3
uvec3;
532 typedef mediump_uvec4
uvec4;
533 #else //defined(GLM_PRECISION_HIGHP_UINT)
534 typedef highp_uvec2
uvec2;
548 #endif//GLM_PRECISION
552 #if(defined(GLM_PRECISION_LOWP_BOOL))
553 typedef lowp_bvec2
bvec2;
554 typedef lowp_bvec3
bvec3;
555 typedef lowp_bvec4
bvec4;
556 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
557 typedef mediump_bvec2
bvec2;
558 typedef mediump_bvec3
bvec3;
559 typedef mediump_bvec4
bvec4;
560 #else //defined(GLM_PRECISION_HIGHP_BOOL)
561 typedef highp_bvec2
bvec2;
575 #endif//GLM_PRECISION
highp_ivec3 ivec3
3 components vector of signed integer numbers.
tvec4< int, lowp > lowp_ivec4
4 components vector of low precision signed integer numbers.
highp_bvec3 bvec3
3 components vector of boolean.
tvec4< int, highp > highp_ivec4
4 components vector of high precision signed integer numbers.
tvec4< float, lowp > lowp_vec4
4 components vector of low single-precision floating-point numbers.
tvec2< float, lowp > lowp_vec2
2 components vector of low single-precision floating-point numbers.
tvec3< float, highp > highp_vec3
3 components vector of high single-precision floating-point numbers.
tvec3< double, lowp > lowp_dvec3
3 components vector of low double-precision floating-point numbers.
highp_bvec4 bvec4
4 components vector of boolean.
tvec2< int, lowp > lowp_ivec2
2 components vector of low precision signed integer numbers.
tvec4< float, mediump > mediump_vec4
4 components vector of medium single-precision floating-point numbers.
tvec2< uint, highp > highp_uvec2
2 components vector of high precision unsigned integer numbers.
highp_vec4 vec4
4 components vector of floating-point numbers.
tvec3< double, highp > highp_dvec3
3 components vector of high double-precision floating-point numbers.
highp_ivec2 ivec2
2 components vector of signed integer numbers.
tvec3< float, lowp > lowp_vec3
3 components vector of low single-precision floating-point numbers.
tvec4< int, mediump > mediump_ivec4
4 components vector of medium precision signed integer numbers.
tvec2< int, mediump > mediump_ivec2
2 components vector of medium precision signed integer numbers.
tvec3< int, lowp > lowp_ivec3
3 components vector of low precision signed integer numbers.
tvec4< bool, highp > highp_bvec4
4 components vector of high precision bool numbers.
highp_bvec2 bvec2
2 components vector of boolean.
tvec3< bool, highp > highp_bvec3
3 components vector of high precision bool numbers.
tvec4< float, highp > highp_vec4
4 components vector of high single-precision floating-point numbers.
tvec2< bool, lowp > lowp_bvec2
2 components vector of low precision bool numbers.
tvec4< double, highp > highp_dvec4
4 components vector of high double-precision floating-point numbers.
tvec2< double, lowp > lowp_dvec2
2 components vector of low double-precision floating-point numbers.
highp_uvec3 uvec3
3 components vector of unsigned integer numbers.
tvec3< float, mediump > mediump_vec3
3 components vector of medium single-precision floating-point numbers.
tvec4< bool, mediump > mediump_bvec4
4 components vector of medium precision bool numbers.
tvec4< bool, lowp > lowp_bvec4
4 components vector of low precision bool numbers.
tvec4< uint, mediump > mediump_uvec4
4 components vector of medium precision unsigned integer numbers.
tvec4< uint, highp > highp_uvec4
4 components vector of high precision unsigned integer numbers.
tvec3< uint, highp > highp_uvec3
3 components vector of high precision unsigned integer numbers.
tvec4< double, lowp > lowp_dvec4
4 components vector of low double-precision floating-point numbers.
tvec3< int, highp > highp_ivec3
3 components vector of high precision signed integer numbers.
tvec2< float, mediump > mediump_vec2
2 components vector of medium single-precision floating-point numbers.
highp_uvec4 uvec4
4 components vector of unsigned integer numbers.
tvec2< double, mediump > mediump_dvec2
2 components vector of medium double-precision floating-point numbers.
tvec2< float, highp > highp_vec2
2 components vector of high single-precision floating-point numbers.
tvec2< bool, mediump > mediump_bvec2
2 components vector of medium precision bool numbers.
tvec3< bool, mediump > mediump_bvec3
3 components vector of medium precision bool numbers.
tvec2< bool, highp > highp_bvec2
2 components vector of high precision bool numbers.
highp_dvec3 dvec3
3 components vector of double-precision floating-point numbers.
tvec2< uint, mediump > mediump_uvec2
2 components vector of medium precision unsigned integer numbers.
highp_uvec2 uvec2
2 components vector of unsigned integer numbers.
highp_dvec4 dvec4
4 components vector of double-precision floating-point numbers.
tvec4< double, mediump > mediump_dvec4
4 components vector of medium double-precision floating-point numbers.
tvec3< uint, lowp > lowp_uvec3
3 components vector of low precision unsigned integer numbers.
tvec3< double, mediump > mediump_dvec3
3 components vector of medium double-precision floating-point numbers.
tvec2< uint, lowp > lowp_uvec2
2 components vector of low precision unsigned integer numbers.
tvec2< int, highp > highp_ivec2
2 components vector of high precision signed integer numbers.
tvec3< bool, lowp > lowp_bvec3
3 components vector of low precision bool numbers.
tvec3< int, mediump > mediump_ivec3
3 components vector of medium precision signed integer numbers.
highp_vec3 vec3
3 components vector of floating-point numbers.
highp_dvec2 dvec2
2 components vector of double-precision floating-point numbers.
tvec2< double, highp > highp_dvec2
2 components vector of high double-precision floating-point numbers.
highp_vec2 vec2
2 components vector of floating-point numbers.
tvec3< uint, mediump > mediump_uvec3
3 components vector of medium precision unsigned integer numbers.
tvec4< uint, lowp > lowp_uvec4
4 components vector of low precision unsigned integer numbers.
highp_ivec4 ivec4
4 components vector of signed integer numbers.