From 0613b5c0f12f00f1158c427012d2fe59b1dae356 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 7 Sep 2014 01:17:20 +0200 Subject: [PATCH] Limited extended integer type redifinition (#233) --- glm/fwd.hpp | 648 ++++++++++++++++++------------------- glm/gtc/type_precision.hpp | 14 + 2 files changed, 333 insertions(+), 329 deletions(-) diff --git a/glm/fwd.hpp b/glm/fwd.hpp index e2a9822da..f42b4f881 100644 --- a/glm/fwd.hpp +++ b/glm/fwd.hpp @@ -923,22 +923,21 @@ namespace glm /// 8 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint8 u8; - + /// 16 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint16 u16; - + /// 32 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint32 u32; - + /// 64 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint64 u64; - - - - + + + /// Low precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 lowp_u8vec1; @@ -959,36 +958,36 @@ namespace glm /// Medium precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 mediump_u8vec1; - + /// Medium precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 mediump_u8vec2; - + /// Medium precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 mediump_u8vec3; - + /// Medium precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 mediump_u8vec4; - - + + /// High precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 highp_u8vec1; - + /// High precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 highp_u8vec2; - + /// High precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 highp_u8vec3; - + /// High precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 highp_u8vec4; - + #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u8vec1 u8vec1; typedef lowp_u8vec2 u8vec2; @@ -1003,72 +1002,72 @@ namespace glm /// Default precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision typedef highp_u8vec1 u8vec1; - + /// Default precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef highp_u8vec2 u8vec2; - + /// Default precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef highp_u8vec3 u8vec3; - + /// Default precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef highp_u8vec4 u8vec4; #endif - - + + /// Low precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 lowp_u16vec1; - + /// Low precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 lowp_u16vec2; - + /// Low precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 lowp_u16vec3; - + /// Low precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 lowp_u16vec4; - - + + /// Medium precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 mediump_u16vec1; - + /// Medium precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 mediump_u16vec2; - + /// Medium precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 mediump_u16vec3; - + /// Medium precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 mediump_u16vec4; - - + + /// High precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 highp_u16vec1; - + /// High precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 highp_u16vec2; - + /// High precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 highp_u16vec3; - + /// High precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 highp_u16vec4; - - + + #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u16vec1 u16vec1; typedef lowp_u16vec2 u16vec2; @@ -1083,15 +1082,15 @@ namespace glm /// Default precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision typedef highp_u16vec1 u16vec1; - + /// Default precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef highp_u16vec2 u16vec2; - + /// Default precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef highp_u16vec3 u16vec3; - + /// Default precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef highp_u16vec4 u16vec4; @@ -1101,53 +1100,53 @@ namespace glm /// Low precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 lowp_u32vec1; - + /// Low precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 lowp_u32vec2; - + /// Low precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 lowp_u32vec3; - + /// Low precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 lowp_u32vec4; - - + + /// Medium precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 mediump_u32vec1; - + /// Medium precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 mediump_u32vec2; - + /// Medium precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 mediump_u32vec3; - + /// Medium precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 mediump_u32vec4; - - + + /// High precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 highp_u32vec1; - + /// High precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 highp_u32vec2; - + /// High precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 highp_u32vec3; - + /// High precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 highp_u32vec4; - + #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u32vec1 u32vec1; typedef lowp_u32vec2 u32vec2; @@ -1162,15 +1161,15 @@ namespace glm /// Default precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef highp_u32vec1 u32vec1; - + /// Default precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef highp_u32vec2 u32vec2; - + /// Default precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef highp_u32vec3 u32vec3; - + /// Default precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef highp_u32vec4 u32vec4; @@ -1180,53 +1179,53 @@ namespace glm /// Low precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 lowp_u32vec1; - + /// Low precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 lowp_u32vec2; - + /// Low precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 lowp_u32vec3; - + /// Low precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 lowp_u32vec4; - - + + /// Medium precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 mediump_u32vec1; - + /// Medium precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 mediump_u32vec2; - + /// Medium precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 mediump_u32vec3; - + /// Medium precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 mediump_u32vec4; - - + + /// High precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 highp_u32vec1; - + /// High precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 highp_u32vec2; - + /// High precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 highp_u32vec3; - + /// High precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 highp_u32vec4; - + #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u32vec1 u32vec1; typedef lowp_u32vec2 u32vec2; @@ -1260,53 +1259,53 @@ namespace glm /// Low precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 lowp_u64vec1; - + /// Low precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 lowp_u64vec2; - + /// Low precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 lowp_u64vec3; - + /// Low precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 lowp_u64vec4; - - + + /// Medium precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 mediump_u64vec1; - + /// Medium precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 mediump_u64vec2; - + /// Medium precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 mediump_u64vec3; - + /// Medium precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 mediump_u64vec4; - - + + /// High precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision typedef detail::tvec1 highp_u64vec1; - + /// High precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision typedef detail::tvec2 highp_u64vec2; - + /// High precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision typedef detail::tvec3 highp_u64vec3; - + /// High precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision typedef detail::tvec4 highp_u64vec4; - + #if(defined(GLM_PRECISION_LOWP_UINT)) typedef lowp_u64vec1 u64vec1; typedef lowp_u64vec2 u64vec2; @@ -1338,51 +1337,51 @@ namespace glm ////////////////////// // Float vector types - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32_t; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64_t; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef float32 lowp_f32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef float64 lowp_f64; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32_t; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64_t; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef float32 lowp_f32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef float64 lowp_f64; @@ -1391,11 +1390,11 @@ namespace glm /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 lowp_float32_t; @@ -1403,61 +1402,61 @@ namespace glm /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 lowp_float64_t; - + /// Low 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef float32 lowp_f32; - + /// Low 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef float64 lowp_f64; - + /// Medium 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 mediump_float32; - + /// Medium 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 mediump_float64; - + /// Medium 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 mediump_float32_t; - + /// Medium 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 mediump_float64_t; - + /// Medium 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef float32 mediump_f32; - + /// Medium 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef float64 mediump_f64; - + /// High 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 highp_float32; - + /// High 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 highp_float64; - + /// High 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float32 highp_float32_t; - + /// High 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef detail::float64 highp_float64_t; - + /// High 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef float32 highp_f32; - + /// High 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef float64 highp_f64; @@ -1467,75 +1466,75 @@ namespace glm /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_float32 float32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_float64 float64; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_float32_t float32_t; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_float64_t float64_t; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_f32 f32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef lowp_f64 f64; #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float32 float32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float64 float64; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float32 float32_t; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float64 float64_t; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float32 f32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef mediump_float64 f64; #else//(defined(GLM_PRECISION_HIGHP_FLOAT)) - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float32 float32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float64 float64; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float32_t float32_t; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float64_t float64_t; - + /// Default 32 bit single-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float32_t f32; - + /// Default 64 bit double-precision floating-point scalar. /// @see gtc_type_precision typedef highp_float64_t f64; @@ -1545,132 +1544,130 @@ namespace glm /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 lowp_vec1; - + /// Low single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 lowp_vec2; - + /// Low single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 lowp_vec3; - + /// Low single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 lowp_vec4; - + /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 lowp_fvec1; - + /// Low single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 lowp_fvec2; - + /// Low single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 lowp_fvec3; - + /// Low single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 lowp_fvec4; - - - + + /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 mediump_vec1; - + /// Medium Single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 mediump_vec2; - + /// Medium Single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 mediump_vec3; - + /// Medium Single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 mediump_vec4; - + /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 mediump_fvec1; - + /// Medium Single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 mediump_fvec2; - + /// Medium Single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 mediump_fvec3; - + /// Medium Single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 mediump_fvec4; - /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 highp_vec1; - + /// High Single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 highp_vec2; - + /// High Single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 highp_vec3; - + /// High Single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 highp_vec4; - + /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 highp_fvec1; - + /// High Single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 highp_fvec2; - + /// High Single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 highp_fvec3; - + /// High Single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 highp_fvec4; - - + + /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 lowp_f32vec1; - + /// Low single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 lowp_f32vec2; - + /// Low single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 lowp_f32vec3; - + /// Low single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 lowp_f32vec4; - + /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 mediump_f32vec1; - + /// Medium single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 mediump_f32vec2; - + /// Medium single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 mediump_f32vec3; - + /// Medium single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 mediump_f32vec4; @@ -1678,235 +1675,234 @@ namespace glm /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 highp_f32vec1; - + /// High single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 highp_f32vec2; - + /// High single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 highp_f32vec3; - + /// High single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 highp_f32vec4; - + /// Low double-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 lowp_f64vec1; - + /// Low double-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 lowp_f64vec2; - + /// Low double-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 lowp_f64vec3; - + /// Low double-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 lowp_f64vec4; - + /// Medium double-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 mediump_f64vec1; - + /// Medium double-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 mediump_f64vec2; - + /// Medium double-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 mediump_f64vec3; - + /// Medium double-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 mediump_f64vec4; - + /// High double-precision floating-point vector of 1 component. /// @see gtc_type_precision typedef detail::tvec1 highp_f64vec1; - + /// High double-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef detail::tvec2 highp_f64vec2; - + /// High double-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef detail::tvec3 highp_f64vec3; - + /// High double-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef detail::tvec4 highp_f64vec4; - - + + ////////////////////// // Float matrix types - + /// Low single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef lowp_f32 lowp_fmat1x1; - + /// Low single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 lowp_fmat2x2; - + /// Low single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 lowp_fmat2x3; - + /// Low single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 lowp_fmat2x4; - + /// Low single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 lowp_fmat3x2; - + /// Low single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 lowp_fmat3x3; - + /// Low single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 lowp_fmat3x4; - + /// Low single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 lowp_fmat4x2; - + /// Low single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 lowp_fmat4x3; - + /// Low single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 lowp_fmat4x4; - + /// Low single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef lowp_fmat1x1 lowp_fmat1; - + /// Low single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef lowp_fmat2x2 lowp_fmat2; - + /// Low single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef lowp_fmat3x3 lowp_fmat3; - + /// Low single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef lowp_fmat4x4 lowp_fmat4; - - + + /// Medium single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef mediump_f32 mediump_fmat1x1; - + /// Medium single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 mediump_fmat2x2; - + /// Medium single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 mediump_fmat2x3; - + /// Medium single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 mediump_fmat2x4; - + /// Medium single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 mediump_fmat3x2; - + /// Medium single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 mediump_fmat3x3; - + /// Medium single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 mediump_fmat3x4; - + /// Medium single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 mediump_fmat4x2; - + /// Medium single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 mediump_fmat4x3; - + /// Medium single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 mediump_fmat4x4; - + /// Medium single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef mediump_fmat1x1 mediump_fmat1; - + /// Medium single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef mediump_fmat2x2 mediump_fmat2; - + /// Medium single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef mediump_fmat3x3 mediump_fmat3; - + /// Medium single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef mediump_fmat4x4 mediump_fmat4; - - + /// High single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef highp_f32 highp_fmat1x1; - + /// High single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 highp_fmat2x2; - + /// High single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 highp_fmat2x3; - + /// High single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 highp_fmat2x4; - + /// High single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 highp_fmat3x2; - + /// High single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 highp_fmat3x3; - + /// High single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 highp_fmat3x4; - + /// High single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 highp_fmat4x2; - + /// High single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 highp_fmat4x3; - + /// High single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 highp_fmat4x4; - + /// High single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef highp_fmat1x1 highp_fmat1; - + /// High single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef highp_fmat2x2 highp_fmat2; - + /// High single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef highp_fmat3x3 highp_fmat3; @@ -1919,210 +1915,206 @@ namespace glm /// Low single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f32 lowp_f32mat1x1; - + /// Low single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 lowp_f32mat2x2; - + /// Low single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 lowp_f32mat2x3; - + /// Low single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 lowp_f32mat2x4; - + /// Low single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 lowp_f32mat3x2; - + /// Low single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 lowp_f32mat3x3; - + /// Low single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 lowp_f32mat3x4; - + /// Low single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 lowp_f32mat4x2; - + /// Low single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 lowp_f32mat4x3; - + /// Low single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 lowp_f32mat4x4; - + /// Low single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef detail::tmat1x1 lowp_f32mat1; - + /// Low single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef lowp_f32mat2x2 lowp_f32mat2; - + /// Low single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef lowp_f32mat3x3 lowp_f32mat3; - + /// Low single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef lowp_f32mat4x4 lowp_f32mat4; - /// High single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f32 mediump_f32mat1x1; - + /// Low single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 mediump_f32mat2x2; - + /// Medium single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 mediump_f32mat2x3; - + /// Medium single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 mediump_f32mat2x4; - + /// Medium single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 mediump_f32mat3x2; - + /// Medium single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 mediump_f32mat3x3; - + /// Medium single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 mediump_f32mat3x4; - + /// Medium single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 mediump_f32mat4x2; - + /// Medium single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 mediump_f32mat4x3; - + /// Medium single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 mediump_f32mat4x4; - + /// Medium single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef detail::tmat1x1 f32mat1; - + /// Medium single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef mediump_f32mat2x2 mediump_f32mat2; - + /// Medium single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef mediump_f32mat3x3 mediump_f32mat3; - + /// Medium single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef mediump_f32mat4x4 mediump_f32mat4; - - /// High single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f32 highp_f32mat1x1; - + /// High single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 highp_f32mat2x2; - + /// High single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 highp_f32mat2x3; - + /// High single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 highp_f32mat2x4; - + /// High single-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 highp_f32mat3x2; - + /// High single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 highp_f32mat3x3; - + /// High single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 highp_f32mat3x4; - + /// High single-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 highp_f32mat4x2; - + /// High single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 highp_f32mat4x3; - + /// High single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 highp_f32mat4x4; - + /// High single-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef detail::tmat1x1 f32mat1; - + /// High single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef highp_f32mat2x2 highp_f32mat2; - + /// High single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef highp_f32mat3x3 highp_f32mat3; - + /// High single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef highp_f32mat4x4 highp_f32mat4; - /// Low double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f64 lowp_f64mat1x1; - + /// Low double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 lowp_f64mat2x2; - + /// Low double-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 lowp_f64mat2x3; - + /// Low double-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 lowp_f64mat2x4; - + /// Low double-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 lowp_f64mat3x2; - + /// Low double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 lowp_f64mat3x3; - + /// Low double-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 lowp_f64mat3x4; - + /// Low double-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 lowp_f64mat4x2; - + /// Low double-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 lowp_f64mat4x3; @@ -2134,57 +2126,56 @@ namespace glm /// Low double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef lowp_f64mat1x1 lowp_f64mat1; - + /// Low double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef lowp_f64mat2x2 lowp_f64mat2; - + /// Low double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef lowp_f64mat3x3 lowp_f64mat3; - + /// Low double-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef lowp_f64mat4x4 lowp_f64mat4; - - + /// Medium double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f64 Highp_f64mat1x1; - + /// Medium double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 mediump_f64mat2x2; - + /// Medium double-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 mediump_f64mat2x3; - + /// Medium double-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 mediump_f64mat2x4; - + /// Medium double-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 mediump_f64mat3x2; - + /// Medium double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 mediump_f64mat3x3; - + /// Medium double-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 mediump_f64mat3x4; - + /// Medium double-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 mediump_f64mat4x2; - + /// Medium double-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 mediump_f64mat4x3; - + /// Medium double-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 mediump_f64mat4x4; @@ -2192,55 +2183,55 @@ namespace glm /// Medium double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef mediump_f64mat1x1 mediump_f64mat1; - + /// Medium double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef mediump_f64mat2x2 mediump_f64mat2; - + /// Medium double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef mediump_f64mat3x3 mediump_f64mat3; - + /// Medium double-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef mediump_f64mat4x4 mediump_f64mat4; - + /// High double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef f64 highp_f64mat1x1; - + /// High double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef detail::tmat2x2 highp_f64mat2x2; - + /// High double-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef detail::tmat2x3 highp_f64mat2x3; - + /// High double-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef detail::tmat2x4 highp_f64mat2x4; - + /// High double-precision floating-point 3x2 matrix. /// @see gtc_type_precision typedef detail::tmat3x2 highp_f64mat3x2; - + /// High double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef detail::tmat3x3 highp_f64mat3x3; - + /// High double-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef detail::tmat3x4 highp_f64mat3x4; - + /// High double-precision floating-point 4x2 matrix. /// @see gtc_type_precision typedef detail::tmat4x2 highp_f64mat4x2; - + /// High double-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef detail::tmat4x3 highp_f64mat4x3; - + /// High double-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef detail::tmat4x4 highp_f64mat4x4; @@ -2248,47 +2239,47 @@ namespace glm /// High double-precision floating-point 1x1 matrix. /// @see gtc_type_precision //typedef highp_f64mat1x1 highp_f64mat1; - + /// High double-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef highp_f64mat2x2 highp_f64mat2; - + /// High double-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef highp_f64mat3x3 highp_f64mat3; - + /// High double-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef highp_f64mat4x4 highp_f64mat4; - + ////////////////////////// // Quaternion types /// Low single-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat lowp_f32quat; - + /// Low double-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat lowp_f64quat; - + /// Medium single-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat mediump_f32quat; - + /// Medium double-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat mediump_f64quat; - + /// High single-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat highp_f32quat; - + /// High double-precision floating-point quaternion. /// @see gtc_type_precision typedef detail::tquat highp_f64quat; - - + + #if(defined(GLM_PRECISION_LOWP_FLOAT)) typedef lowp_f32vec1 fvec1; typedef lowp_f32vec2 fvec2; @@ -2369,11 +2360,11 @@ namespace glm /// Default single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef highp_f32vec2 fvec2; - + /// Default single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef highp_f32vec3 fvec3; - + /// Default single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef highp_f32vec4 fvec4; @@ -2385,7 +2376,7 @@ namespace glm /// Default single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef highp_f32mat2x3 fmat2x3; - + /// Default single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef highp_f32mat2x4 fmat2x4; @@ -2397,7 +2388,7 @@ namespace glm /// Default single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef highp_f32mat3x3 fmat3x3; - + /// Default single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef highp_f32mat3x4 fmat3x4; @@ -2409,7 +2400,7 @@ namespace glm /// Default single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef highp_f32mat4x3 fmat4x3; - + /// Default single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef highp_f32mat4x4 fmat4x4; @@ -2425,7 +2416,7 @@ namespace glm /// Default single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef fmat4x4 fmat4; - + /// Default single-precision floating-point quaternion. /// @see gtc_type_precision typedef highp_fquat fquat; @@ -2439,11 +2430,11 @@ namespace glm /// Default single-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef highp_f32vec2 f32vec2; - + /// Default single-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef highp_f32vec3 f32vec3; - + /// Default single-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef highp_f32vec4 f32vec4; @@ -2455,7 +2446,7 @@ namespace glm /// Default single-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef highp_f32mat2x3 f32mat2x3; - + /// Default single-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef highp_f32mat2x4 f32mat2x4; @@ -2467,7 +2458,7 @@ namespace glm /// Default single-precision floating-point 3x3 matrix. /// @see gtc_type_precision typedef highp_f32mat3x3 f32mat3x3; - + /// Default single-precision floating-point 3x4 matrix. /// @see gtc_type_precision typedef highp_f32mat3x4 f32mat3x4; @@ -2479,11 +2470,11 @@ namespace glm /// Default single-precision floating-point 4x3 matrix. /// @see gtc_type_precision typedef highp_f32mat4x3 f32mat4x3; - + /// Default single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef highp_f32mat4x4 f32mat4x4; - + /// Default single-precision floating-point 2x2 matrix. /// @see gtc_type_precision typedef f32mat2x2 f32mat2; @@ -2495,13 +2486,12 @@ namespace glm /// Default single-precision floating-point 4x4 matrix. /// @see gtc_type_precision typedef f32mat4x4 f32mat4; - + /// Default single-precision floating-point quaternion. /// @see gtc_type_precision typedef highp_f32quat f32quat; #endif - #if(defined(GLM_PRECISION_LOWP_DOUBLE)) typedef lowp_f64vec1 f64vec1; typedef lowp_f64vec2 f64vec2; @@ -2546,11 +2536,11 @@ namespace glm /// Default double-precision floating-point vector of 2 components. /// @see gtc_type_precision typedef highp_f64vec2 f64vec2; - + /// Default double-precision floating-point vector of 3 components. /// @see gtc_type_precision typedef highp_f64vec3 f64vec3; - + /// Default double-precision floating-point vector of 4 components. /// @see gtc_type_precision typedef highp_f64vec4 f64vec4; @@ -2562,7 +2552,7 @@ namespace glm /// Default double-precision floating-point 2x3 matrix. /// @see gtc_type_precision typedef highp_f64mat2x3 f64mat2x3; - + /// Default double-precision floating-point 2x4 matrix. /// @see gtc_type_precision typedef highp_f64mat2x4 f64mat2x4; diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index 5e0350528..620106753 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -230,6 +230,12 @@ namespace glm /// @see gtc_type_precision typedef detail::int64 int64; +#if GLM_HAS_EXTENDED_INTEGER_TYPE + using std::int8_t; + using std::int16_t; + using std::int32_t; + using std::int64_t; +#else /// 8 bit signed integer type. /// @see gtc_type_precision typedef detail::int8 int8_t; @@ -245,6 +251,7 @@ namespace glm /// 64 bit signed integer type. /// @see gtc_type_precision typedef detail::int64 int64_t; +#endif /// 8 bit signed integer type. /// @see gtc_type_precision @@ -494,6 +501,12 @@ namespace glm /// @see gtc_type_precision typedef detail::uint64 uint64; +#if GLM_HAS_EXTENDED_INTEGER_TYPE + using std::uint8_t; + using std::uint16_t; + using std::uint32_t; + using std::uint64_t; +#else /// Default precision 8 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint8 uint8_t; @@ -509,6 +522,7 @@ namespace glm /// Default precision 64 bit unsigned integer type. /// @see gtc_type_precision typedef detail::uint64 uint64_t; +#endif /// Default precision 8 bit unsigned integer type. /// @see gtc_type_precision