12 template <
typename T, std::
size_t size,
bool aligned>
20 #define GLM_ALIGNED_STORAGE_TYPE_STRUCT(x) \
21 template <typename T> \
22 struct storage<T, x, true> { \
23 GLM_ALIGNED_STRUCT(x) type { \
28 GLM_ALIGNED_STORAGE_TYPE_STRUCT(1)
29 GLM_ALIGNED_STORAGE_TYPE_STRUCT(2)
30 GLM_ALIGNED_STORAGE_TYPE_STRUCT(4)
31 GLM_ALIGNED_STORAGE_TYPE_STRUCT(8)
32 GLM_ALIGNED_STORAGE_TYPE_STRUCT(16)
33 GLM_ALIGNED_STORAGE_TYPE_STRUCT(32)
34 GLM_ALIGNED_STORAGE_TYPE_STRUCT(64)
36 # if GLM_ARCH & GLM_ARCH_SSE2_BIT
38 struct storage<float, 16, true>
40 typedef glm_vec4 type;
44 struct storage<int, 16, true>
46 typedef glm_ivec4 type;
50 struct storage<unsigned int, 16, true>
52 typedef glm_uvec4 type;
81 # if (GLM_ARCH & GLM_ARCH_AVX_BIT)
83 struct storage<double, 32, true>
85 typedef glm_dvec4 type;
89 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT)
91 struct storage<int64, 32, true>
93 typedef glm_i64vec4 type;
97 struct storage<uint64, 32, true>
99 typedef glm_u64vec4 type;
104 template <
typename T, precision P>
struct tvec1;
105 template <
typename T, precision P>
struct tvec2;
106 template <
typename T, precision P>
struct tvec3;
107 template <
typename T, precision P>
struct tvec4;
109 typedef tvec1<float, highp> highp_vec1_t;
110 typedef tvec1<float, mediump> mediump_vec1_t;
111 typedef tvec1<float, lowp> lowp_vec1_t;
112 typedef tvec1<double, highp> highp_dvec1_t;
113 typedef tvec1<double, mediump> mediump_dvec1_t;
114 typedef tvec1<double, lowp> lowp_dvec1_t;
115 typedef tvec1<int, highp> highp_ivec1_t;
116 typedef tvec1<int, mediump> mediump_ivec1_t;
117 typedef tvec1<int, lowp> lowp_ivec1_t;
118 typedef tvec1<uint, highp> highp_uvec1_t;
119 typedef tvec1<uint, mediump> mediump_uvec1_t;
120 typedef tvec1<uint, lowp> lowp_uvec1_t;
121 typedef tvec1<bool, highp> highp_bvec1_t;
122 typedef tvec1<bool, mediump> mediump_bvec1_t;
123 typedef tvec1<bool, lowp> lowp_bvec1_t;
442 #if(defined(GLM_PRECISION_LOWP_FLOAT))
443 typedef lowp_vec2
vec2;
444 typedef lowp_vec3
vec3;
445 typedef lowp_vec4
vec4;
446 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
447 typedef mediump_vec2
vec2;
448 typedef mediump_vec3
vec3;
449 typedef mediump_vec4
vec4;
450 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
451 typedef highp_vec2
vec2;
465 #endif//GLM_PRECISION
469 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
470 typedef lowp_dvec2
dvec2;
471 typedef lowp_dvec3
dvec3;
472 typedef lowp_dvec4
dvec4;
473 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
474 typedef mediump_dvec2
dvec2;
475 typedef mediump_dvec3
dvec3;
476 typedef mediump_dvec4
dvec4;
477 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
478 typedef highp_dvec2
dvec2;
492 #endif//GLM_PRECISION
496 #if(defined(GLM_PRECISION_LOWP_INT))
497 typedef lowp_ivec2
ivec2;
498 typedef lowp_ivec3
ivec3;
499 typedef lowp_ivec4
ivec4;
500 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
501 typedef mediump_ivec2
ivec2;
502 typedef mediump_ivec3
ivec3;
503 typedef mediump_ivec4
ivec4;
504 #else //defined(GLM_PRECISION_HIGHP_INT)
505 typedef highp_ivec2
ivec2;
519 #endif//GLM_PRECISION
523 #if(defined(GLM_PRECISION_LOWP_UINT))
524 typedef lowp_uvec2
uvec2;
525 typedef lowp_uvec3
uvec3;
526 typedef lowp_uvec4
uvec4;
527 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
528 typedef mediump_uvec2
uvec2;
529 typedef mediump_uvec3
uvec3;
530 typedef mediump_uvec4
uvec4;
531 #else //defined(GLM_PRECISION_HIGHP_UINT)
532 typedef highp_uvec2
uvec2;
546 #endif//GLM_PRECISION
550 #if(defined(GLM_PRECISION_LOWP_BOOL))
551 typedef lowp_bvec2
bvec2;
552 typedef lowp_bvec3
bvec3;
553 typedef lowp_bvec4
bvec4;
554 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
555 typedef mediump_bvec2
bvec2;
556 typedef mediump_bvec3
bvec3;
557 typedef mediump_bvec4
bvec4;
558 #else //defined(GLM_PRECISION_HIGHP_BOOL)
559 typedef highp_bvec2
bvec2;
573 #endif//GLM_PRECISION
tvec2< bool, mediump > mediump_bvec2
2 components vector of medium precision bool numbers.
tvec4< uint, mediump > mediump_uvec4
4 components vector of medium precision unsigned integer numbers.
tvec3< bool, mediump > mediump_bvec3
3 components vector of medium precision bool numbers.
tvec2< uint, mediump > mediump_uvec2
2 components vector of medium precision unsigned integer numbers.
tvec4< int, mediump > mediump_ivec4
4 components vector of medium precision signed integer numbers.
highp_dvec4 dvec4
4 components vector of double-precision floating-point numbers.
tvec2< int, mediump > mediump_ivec2
2 components vector of medium precision signed integer numbers.
tvec2< double, mediump > mediump_dvec2
2 components vector of medium double-precision floating-point numbers.
tvec3< uint, mediump > mediump_uvec3
3 components vector of medium precision unsigned integer numbers.
tvec3< int, lowp > lowp_ivec3
3 components vector of low precision signed integer numbers.
tvec3< float, lowp > lowp_vec3
3 components vector of low single-precision floating-point numbers.
tvec3< uint, highp > highp_uvec3
3 components vector of high precision unsigned integer numbers.
highp_dvec2 dvec2
2 components vector of double-precision floating-point numbers.
tvec3< uint, lowp > lowp_uvec3
3 components vector of low precision unsigned integer numbers.
tvec2< bool, highp > highp_bvec2
2 components vector of high precision bool numbers.
tvec2< float, highp > highp_vec2
2 components vector of high single-precision floating-point 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.
tvec4< int, lowp > lowp_ivec4
4 components vector of low precision signed integer numbers.
tvec3< double, mediump > mediump_dvec3
3 components vector of medium double-precision floating-point numbers.
highp_uvec3 uvec3
3 components vector of unsigned integer 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.
highp_ivec4 ivec4
4 components vector of signed integer numbers.
highp_ivec3 ivec3
3 components vector of signed integer numbers.
highp_bvec4 bvec4
4 components vector of boolean.
tvec2< uint, highp > highp_uvec2
2 components vector of high precision unsigned integer numbers.
tvec4< uint, lowp > lowp_uvec4
4 components vector of low precision unsigned integer numbers.
highp_dvec3 dvec3
3 components vector of double-precision floating-point numbers.
highp_uvec2 uvec2
2 components vector of unsigned integer numbers.
tvec4< double, mediump > mediump_dvec4
4 components vector of medium double-precision floating-point numbers.
tvec2< double, highp > highp_dvec2
2 components vector of high double-precision floating-point numbers.
tvec3< float, highp > highp_vec3
3 components vector of high single-precision floating-point numbers.
tvec4< float, lowp > lowp_vec4
4 components vector of low single-precision floating-point numbers.
highp_vec3 vec3
3 components vector of floating-point numbers.
tvec2< float, lowp > lowp_vec2
2 components vector of low single-precision floating-point numbers.
tvec4< bool, highp > highp_bvec4
4 components vector of high precision bool numbers.
tvec3< double, lowp > lowp_dvec3
3 components vector of low double-precision floating-point numbers.
highp_vec2 vec2
2 components vector of floating-point 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< double, highp > highp_dvec4
4 components vector of high double-precision floating-point numbers.
tvec4< double, lowp > lowp_dvec4
4 components vector of low double-precision floating-point numbers.
highp_bvec2 bvec2
2 components vector of boolean.
tvec2< double, lowp > lowp_dvec2
2 components vector of low double-precision floating-point numbers.
highp_bvec3 bvec3
3 components vector of boolean.
tvec2< int, lowp > lowp_ivec2
2 components vector of low precision signed integer numbers.
tvec3< int, highp > highp_ivec3
3 components vector of high precision signed integer numbers.
highp_vec4 vec4
4 components vector of floating-point numbers.
tvec4< float, highp > highp_vec4
4 components vector of high single-precision floating-point numbers.
tvec2< float, mediump > mediump_vec2
2 components vector of medium single-precision floating-point numbers.
tvec4< int, highp > highp_ivec4
4 components vector of high precision signed integer numbers.
highp_ivec2 ivec2
2 components vector of signed integer numbers.
tvec2< bool, lowp > lowp_bvec2
2 components vector of low precision bool numbers.
tvec4< bool, lowp > lowp_bvec4
4 components vector of low precision bool numbers.
tvec4< float, mediump > mediump_vec4
4 components vector of medium single-precision floating-point numbers.
tvec4< uint, highp > highp_uvec4
4 components vector of high precision unsigned integer numbers.
tvec3< bool, highp > highp_bvec3
3 components vector of high precision bool numbers.
tvec3< double, highp > highp_dvec3
3 components vector of high double-precision floating-point numbers.
highp_uvec4 uvec4
4 components vector of unsigned integer numbers.