diff --git a/glm/detail/precision.hpp b/glm/detail/precision.hpp index 6f7a28aa..2869cc69 100644 --- a/glm/detail/precision.hpp +++ b/glm/detail/precision.hpp @@ -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, diff --git a/glm/gtc/type_aligned.hpp b/glm/gtc/type_aligned.hpp index 0d533105..14603434 100644 --- a/glm/gtc/type_aligned.hpp +++ b/glm/gtc/type_aligned.hpp @@ -15,25 +15,46 @@ namespace glm template struct tvec3; template struct tvec4; - typedef tvec1 aligned_highp_vec1_t; - typedef tvec1 aligned_mediump_vec1_t; - typedef tvec1 aligned_lowp_vec1_t; - typedef tvec1 aligned_highp_dvec1_t; - typedef tvec1 aligned_mediump_dvec1_t; - typedef tvec1 aligned_lowp_dvec1_t; - typedef tvec1 aligned_highp_ivec1_t; - typedef tvec1 aligned_mediump_ivec1_t; - typedef tvec1 aligned_lowp_ivec1_t; - typedef tvec1 aligned_highp_uvec1_t; - typedef tvec1 aligned_mediump_uvec1_t; - typedef tvec1 aligned_lowp_uvec1_t; - typedef tvec1 aligned_highp_bvec1_t; - typedef tvec1 aligned_mediump_bvec1_t; - typedef tvec1 aligned_lowp_bvec1_t; /// @addtogroup gtc_type_aligned /// @{ + // -- *vec1 -- + + typedef tvec1 aligned_highp_vec1; + typedef tvec1 aligned_mediump_vec1; + typedef tvec1 aligned_lowp_vec1; + typedef tvec1 aligned_highp_dvec1; + typedef tvec1 aligned_mediump_dvec1; + typedef tvec1 aligned_lowp_dvec1; + typedef tvec1 aligned_highp_ivec1; + typedef tvec1 aligned_mediump_ivec1; + typedef tvec1 aligned_lowp_ivec1; + typedef tvec1 aligned_highp_uvec1; + typedef tvec1 aligned_mediump_uvec1; + typedef tvec1 aligned_lowp_uvec1; + typedef tvec1 aligned_highp_bvec1; + typedef tvec1 aligned_mediump_bvec1; + typedef tvec1 aligned_lowp_bvec1; + + typedef tvec1 packed_highp_vec1; + typedef tvec1 packed_mediump_vec1; + typedef tvec1 packed_lowp_vec1; + typedef tvec1 packed_highp_dvec1; + typedef tvec1 packed_mediump_dvec1; + typedef tvec1 packed_lowp_dvec1; + typedef tvec1 packed_highp_ivec1; + typedef tvec1 packed_mediump_ivec1; + typedef tvec1 packed_lowp_ivec1; + typedef tvec1 packed_highp_uvec1; + typedef tvec1 packed_mediump_uvec1; + typedef tvec1 packed_lowp_uvec1; + typedef tvec1 packed_highp_bvec1; + typedef tvec1 packed_mediump_bvec1; + typedef tvec1 packed_lowp_bvec1; + + // -- *vec2 -- + /// 2 components vector of high single-precision floating-point numbers. /// There is no guarantee on the actual precision. typedef tvec2 aligned_highp_vec2; @@ -94,6 +115,8 @@ namespace glm /// There is no guarantee on the actual precision. typedef tvec2 aligned_lowp_bvec2; + // -- *vec3 -- + /// 3 components vector of high single-precision floating-point numbers. /// There is no guarantee on the actual precision. typedef tvec3 aligned_highp_vec3; @@ -151,6 +174,8 @@ namespace glm /// 3 components vector of low precision bool numbers. typedef tvec3 aligned_lowp_bvec3; + // -- *vec4 -- + /// 4 components vector of high single-precision floating-point numbers. typedef tvec4 aligned_highp_vec4; @@ -196,40 +221,46 @@ namespace glm /// 4 components vector of low precision bool numbers. typedef tvec4 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 GLSL 4.20.8 specification, section 4.1.5 Vectors typedef aligned_highp_vec2 aligned_vec2; - //! 3 components vector of floating-point numbers. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// 3 components vector of floating-point numbers. typedef aligned_highp_vec3 aligned_vec3; - //! 4 components vector of floating-point numbers. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// 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;