Updated GTC_type_aligned extension

This commit is contained in:
Christophe Riccio 2016-06-09 23:18:44 +02:00
parent c256a4ed11
commit 9613edbaf5
2 changed files with 73 additions and 27 deletions

View File

@ -10,10 +10,10 @@ namespace glm
highp,
mediump,
lowp,
unaligned_highp = highp,
unaligned_mediump = mediump,
unaligned_lowp = lowp,
unaligned = unaligned_highp,
packed_highp = highp,
packed_mediump = mediump,
packed_lowp = lowp,
packed = packed_highp,
aligned_highp,
aligned_mediump,
aligned_lowp,

View File

@ -15,25 +15,46 @@ namespace glm
template <typename T, precision P> struct tvec3;
template <typename T, precision P> struct tvec4;
typedef tvec1<float, aligned_highp> aligned_highp_vec1_t;
typedef tvec1<float, aligned_mediump> aligned_mediump_vec1_t;
typedef tvec1<float, aligned_lowp> aligned_lowp_vec1_t;
typedef tvec1<double, aligned_highp> aligned_highp_dvec1_t;
typedef tvec1<double, aligned_mediump> aligned_mediump_dvec1_t;
typedef tvec1<double, aligned_lowp> aligned_lowp_dvec1_t;
typedef tvec1<int, aligned_highp> aligned_highp_ivec1_t;
typedef tvec1<int, aligned_mediump> aligned_mediump_ivec1_t;
typedef tvec1<int, aligned_lowp> aligned_lowp_ivec1_t;
typedef tvec1<uint, aligned_highp> aligned_highp_uvec1_t;
typedef tvec1<uint, aligned_mediump> aligned_mediump_uvec1_t;
typedef tvec1<uint, aligned_lowp> aligned_lowp_uvec1_t;
typedef tvec1<bool, aligned_highp> aligned_highp_bvec1_t;
typedef tvec1<bool, aligned_mediump> aligned_mediump_bvec1_t;
typedef tvec1<bool, aligned_lowp> aligned_lowp_bvec1_t;
/// @addtogroup gtc_type_aligned
/// @{
// -- *vec1 --
typedef tvec1<float, aligned_highp> aligned_highp_vec1;
typedef tvec1<float, aligned_mediump> aligned_mediump_vec1;
typedef tvec1<float, aligned_lowp> aligned_lowp_vec1;
typedef tvec1<double, aligned_highp> aligned_highp_dvec1;
typedef tvec1<double, aligned_mediump> aligned_mediump_dvec1;
typedef tvec1<double, aligned_lowp> aligned_lowp_dvec1;
typedef tvec1<int, aligned_highp> aligned_highp_ivec1;
typedef tvec1<int, aligned_mediump> aligned_mediump_ivec1;
typedef tvec1<int, aligned_lowp> aligned_lowp_ivec1;
typedef tvec1<uint, aligned_highp> aligned_highp_uvec1;
typedef tvec1<uint, aligned_mediump> aligned_mediump_uvec1;
typedef tvec1<uint, aligned_lowp> aligned_lowp_uvec1;
typedef tvec1<bool, aligned_highp> aligned_highp_bvec1;
typedef tvec1<bool, aligned_mediump> aligned_mediump_bvec1;
typedef tvec1<bool, aligned_lowp> aligned_lowp_bvec1;
typedef tvec1<float, packed_highp> packed_highp_vec1;
typedef tvec1<float, packed_mediump> packed_mediump_vec1;
typedef tvec1<float, packed_lowp> packed_lowp_vec1;
typedef tvec1<double, packed_highp> packed_highp_dvec1;
typedef tvec1<double, packed_mediump> packed_mediump_dvec1;
typedef tvec1<double, packed_lowp> packed_lowp_dvec1;
typedef tvec1<int, packed_highp> packed_highp_ivec1;
typedef tvec1<int, packed_mediump> packed_mediump_ivec1;
typedef tvec1<int, packed_lowp> packed_lowp_ivec1;
typedef tvec1<uint, packed_highp> packed_highp_uvec1;
typedef tvec1<uint, packed_mediump> packed_mediump_uvec1;
typedef tvec1<uint, packed_lowp> packed_lowp_uvec1;
typedef tvec1<bool, packed_highp> packed_highp_bvec1;
typedef tvec1<bool, packed_mediump> packed_mediump_bvec1;
typedef tvec1<bool, packed_lowp> packed_lowp_bvec1;
// -- *vec2 --
/// 2 components vector of high single-precision floating-point numbers.
/// There is no guarantee on the actual precision.
typedef tvec2<float, aligned_highp> aligned_highp_vec2;
@ -94,6 +115,8 @@ namespace glm
/// There is no guarantee on the actual precision.
typedef tvec2<bool, aligned_lowp> aligned_lowp_bvec2;
// -- *vec3 --
/// 3 components vector of high single-precision floating-point numbers.
/// There is no guarantee on the actual precision.
typedef tvec3<float, aligned_highp> aligned_highp_vec3;
@ -151,6 +174,8 @@ namespace glm
/// 3 components vector of low precision bool numbers.
typedef tvec3<bool, aligned_lowp> aligned_lowp_bvec3;
// -- *vec4 --
/// 4 components vector of high single-precision floating-point numbers.
typedef tvec4<float, aligned_highp> aligned_highp_vec4;
@ -196,40 +221,46 @@ namespace glm
/// 4 components vector of low precision bool numbers.
typedef tvec4<bool, aligned_lowp> aligned_lowp_bvec4;
// -- default --
#if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef aligned_lowp_vec1 aligned_vec1;
typedef aligned_lowp_vec2 aligned_vec2;
typedef aligned_lowp_vec3 aligned_vec3;
typedef aligned_lowp_vec4 aligned_vec4;
#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef aligned_mediump_vec1 aligned_vec1;
typedef aligned_mediump_vec2 aligned_vec2;
typedef aligned_mediump_vec3 aligned_vec3;
typedef aligned_mediump_vec4 aligned_vec4;
#else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 1 component vector of floating-point numbers.
typedef aligned_highp_vec1 aligned_vec1;
/// 2 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef aligned_highp_vec2 aligned_vec2;
//! 3 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// 3 components vector of floating-point numbers.
typedef aligned_highp_vec3 aligned_vec3;
//! 4 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// 4 components vector of floating-point numbers.
typedef aligned_highp_vec4 aligned_vec4;
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef aligned_lowp_dvec1 aligned_dvec1;
typedef aligned_lowp_dvec2 aligned_dvec2;
typedef aligned_lowp_dvec3 aligned_dvec3;
typedef aligned_lowp_dvec4 aligned_dvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef aligned_mediump_dvec1 aligned_dvec1;
typedef aligned_mediump_dvec2 aligned_dvec2;
typedef aligned_mediump_dvec3 aligned_dvec3;
typedef aligned_mediump_dvec4 aligned_dvec4;
#else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 1 component vector of double-precision floating-point numbers.
typedef aligned_highp_dvec1 aligned_dvec1;
/// 2 components vector of double-precision floating-point numbers.
typedef aligned_highp_dvec2 aligned_dvec2;
@ -241,14 +272,19 @@ namespace glm
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_LOWP_INT))
typedef aligned_lowp_ivec1 aligned_ivec1;
typedef aligned_lowp_ivec2 aligned_ivec2;
typedef aligned_lowp_ivec3 aligned_ivec3;
typedef aligned_lowp_ivec4 aligned_ivec4;
#elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef aligned_mediump_ivec1 aligned_ivec1;
typedef aligned_mediump_ivec2 aligned_ivec2;
typedef aligned_mediump_ivec3 aligned_ivec3;
typedef aligned_mediump_ivec4 aligned_ivec4;
#else //defined(GLM_PRECISION_HIGHP_INT)
/// 1 component vector of signed integer numbers.
typedef aligned_highp_ivec1 aligned_ivec1;
/// 2 components vector of signed integer numbers.
typedef aligned_highp_ivec2 aligned_ivec2;
@ -262,14 +298,19 @@ namespace glm
// -- Unsigned integer definition --
#if(defined(GLM_PRECISION_LOWP_UINT))
typedef aligned_lowp_uvec1 aligned_uvec1;
typedef aligned_lowp_uvec2 aligned_uvec2;
typedef aligned_lowp_uvec3 aligned_uvec3;
typedef aligned_lowp_uvec4 aligned_uvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef aligned_mediump_uvec1 aligned_uvec1;
typedef aligned_mediump_uvec2 aligned_uvec2;
typedef aligned_mediump_uvec3 aligned_uvec3;
typedef aligned_mediump_uvec4 aligned_uvec4;
#else //defined(GLM_PRECISION_HIGHP_UINT)
/// 1 component vector of unsigned integer numbers.
typedef aligned_highp_uvec1 aligned_uvec1;
/// 2 components vector of unsigned integer numbers.
typedef aligned_highp_uvec2 aligned_uvec2;
@ -281,14 +322,19 @@ namespace glm
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_LOWP_BOOL))
typedef aligned_lowp_bvec1 aligned_bvec1;
typedef aligned_lowp_bvec2 aligned_bvec2;
typedef aligned_lowp_bvec3 aligned_bvec3;
typedef aligned_lowp_bvec4 aligned_bvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef aligned_mediump_bvec1 aligned_bvec1;
typedef aligned_mediump_bvec2 aligned_bvec2;
typedef aligned_mediump_bvec3 aligned_bvec3;
typedef aligned_mediump_bvec4 aligned_bvec4;
#else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 1 component vector of boolean.
typedef aligned_highp_bvec1 aligned_bvec1;
/// 2 components vector of boolean.
typedef aligned_highp_bvec2 aligned_bvec2;