From ea09100144e07842ab3be5a1c9e20eeb66bae91c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 31 Mar 2013 03:33:24 +0200 Subject: [PATCH] Added forward declarations (glm/fwd.hpp) for faster compilations, issue #56 --- glm/core/_detail.hpp | 60 --- glm/core/_vectorize.hpp | 30 ++ glm/core/func_vector_relational.hpp | 2 - glm/core/type.hpp | 573 ++++++++++++++++++++++++++-- glm/core/type_float.hpp | 8 +- glm/core/type_gentype.hpp | 4 +- glm/core/type_half.hpp | 2 +- glm/core/type_int.hpp | 1 - glm/core/type_mat2x2.hpp | 64 +--- glm/core/type_mat2x3.hpp | 44 +-- glm/core/type_mat2x4.hpp | 43 +-- glm/core/type_mat3x2.hpp | 43 +-- glm/core/type_mat3x3.hpp | 70 +--- glm/core/type_mat3x4.hpp | 127 +++--- glm/core/type_mat4x2.hpp | 57 +-- glm/core/type_mat4x3.hpp | 111 ++---- glm/core/type_mat4x4.hpp | 148 +++---- glm/core/type_size.hpp | 43 --- glm/core/type_vec1.hpp | 18 +- glm/core/type_vec2.hpp | 79 +--- glm/core/type_vec3.hpp | 77 +--- glm/core/type_vec4.hpp | 75 +--- 22 files changed, 736 insertions(+), 943 deletions(-) delete mode 100644 glm/core/_detail.hpp delete mode 100644 glm/core/type_size.hpp diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp deleted file mode 100644 index 16e4ba02..00000000 --- a/glm/core/_detail.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_detail.hpp -/// @date 2008-07-24 / 2011-06-14 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_detail -#define glm_core_detail -/* -#include "setup.hpp" - -namespace glm{ -namespace detail -{ - template - struct If - { - template - static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) - { - return functor(val); - } - }; - - template<> - struct If - { - template - static GLM_FUNC_QUALIFIER T apply(F, const T& val) - { - return val; - } - }; - -}//namespace detail -}//namespace glm -*/ -#endif//glm_core_detail diff --git a/glm/core/_vectorize.hpp b/glm/core/_vectorize.hpp index 9984014f..6321b220 100644 --- a/glm/core/_vectorize.hpp +++ b/glm/core/_vectorize.hpp @@ -26,6 +26,9 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// +#ifndef GLM_CORE_DETAIL_INCLUDED +#define GLM_CORE_DETAIL_INCLUDED + #define VECTORIZE2_VEC(func) \ template \ GLM_FUNC_QUALIFIER detail::tvec2 func( \ @@ -157,3 +160,30 @@ VECTORIZE2_VEC_VEC(func) \ VECTORIZE3_VEC_VEC(func) \ VECTORIZE4_VEC_VEC(func) + +namespace glm{ +namespace detail +{ + template + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F, const T& val) + { + return val; + } + }; +}//namespace detail +}//namespace glm + +#endif//GLM_CORE_DETAIL_INCLUDED diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp index 74fab40c..5954047d 100644 --- a/glm/core/func_vector_relational.hpp +++ b/glm/core/func_vector_relational.hpp @@ -41,8 +41,6 @@ #ifndef GLM_CORE_func_vector_relational #define GLM_CORE_func_vector_relational GLM_VERSION -#include "_detail.hpp" - namespace glm { /// @addtogroup core_func_vector_relational diff --git a/glm/core/type.hpp b/glm/core/type.hpp index c5ddee6d..4249fda2 100644 --- a/glm/core/type.hpp +++ b/glm/core/type.hpp @@ -22,34 +22,545 @@ /// /// @ref core /// @file glm/core/type.hpp -/// @date 2008-01-08 / 2011-06-15 +/// @date 2008-01-08 / 2013-03-31 /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// #ifndef glm_core_type #define glm_core_type -#include "type_half.hpp" -#include "type_float.hpp" -#include "type_int.hpp" +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; +}//namespace detail -#include "type_vec1.hpp" -#include "type_vec2.hpp" -#include "type_vec3.hpp" -#include "type_vec4.hpp" + typedef detail::tvec1 highp_vec1_t; + typedef detail::tvec1 mediump_vec1_t; + typedef detail::tvec1 lowp_vec1_t; + typedef detail::tvec1 highp_ivec1_t; + typedef detail::tvec1 mediump_ivec1_t; + typedef detail::tvec1 lowp_ivec1_t; + typedef detail::tvec1 highp_uvec1_t; + typedef detail::tvec1 mediump_uvec1_t; + typedef detail::tvec1 lowp_uvec1_t; + + /// @addtogroup core_precision + /// @{ + + /// 2 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_vec2; + + /// 2 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_vec2; + + /// 2 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_vec2; + + /// 2 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_ivec2; + + /// 2 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_ivec2; + + /// 2 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_ivec2; + + /// 2 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_uvec2; + + /// 2 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_uvec2; + + /// 2 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_uvec2; + + /// @} + + + /// @addtogroup core_precision + /// @{ + + /// 3 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_vec3; + + /// 3 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_vec3; + + /// 3 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_vec3; + + /// 3 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_ivec3; + + /// 3 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_ivec3; + + /// 3 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_ivec3; + + /// 3 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_uvec3; + + /// 3 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_uvec3; + + /// 3 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_uvec3; + + /// @} -#include "type_mat2x2.hpp" -#include "type_mat2x3.hpp" -#include "type_mat2x4.hpp" -#include "type_mat3x2.hpp" -#include "type_mat3x3.hpp" -#include "type_mat3x4.hpp" -#include "type_mat4x2.hpp" -#include "type_mat4x3.hpp" -#include "type_mat4x4.hpp" + /// @addtogroup core_precision + /// @{ + + /// 4 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_vec4; + + /// 4 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_vec4; + + /// 4 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_vec4; + + /// 4 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_ivec4; + + /// 4 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_ivec4; + + /// 4 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_ivec4; + + /// 4 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_uvec4; + + /// 4 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_uvec4; + + /// 4 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_uvec4; + + /// @} -namespace glm -{ + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2; + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2x2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2x2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2x2; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 lowp_mat2x3; + + /// 2 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 mediump_mat2x3; + + /// 2 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 highp_mat2x3; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 lowp_mat2x4; + + /// 2 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 mediump_mat2x4; + + /// 2 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 highp_mat2x4; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 lowp_mat3x2; + + /// 3 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 mediump_mat3x2; + + /// 3 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 highp_mat3x2; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3; + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3x3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3x3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3x3; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 lowp_mat3x4; + + /// 3 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 mediump_mat3x4; + + /// 3 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 highp_mat3x4; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 lowp_mat4x2; + + /// 4 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 mediump_mat4x2; + + /// 4 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 highp_mat4x2; + + /// @} + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 lowp_mat4x3; + + /// 4 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 mediump_mat4x3; + + /// 4 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 highp_mat4x3; + + /// @} + + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4; + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4x4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4x4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4x4; + + /// @} + /// @addtogroup core_types /// @{ @@ -57,9 +568,9 @@ namespace glm // Float definition #if(defined(GLM_PRECISION_HIGHP_FLOAT)) - typedef highp_vec2 vec2; - typedef highp_vec3 vec3; - typedef highp_vec4 vec4; + typedef highp_vec2 vec2; + typedef highp_vec3 vec3; + typedef highp_vec4 vec4; typedef highp_mat2x2 mat2x2; typedef highp_mat2x3 mat2x3; typedef highp_mat2x4 mat2x4; @@ -73,15 +584,15 @@ namespace glm typedef mediump_vec2 vec2; typedef mediump_vec3 vec3; typedef mediump_vec4 vec4; - typedef mediump_mat2x2 mat2x2; - typedef mediump_mat2x3 mat2x3; - typedef mediump_mat2x4 mat2x4; - typedef mediump_mat3x2 mat3x2; - typedef mediump_mat3x3 mat3x3; - typedef mediump_mat3x4 mat3x4; - typedef mediump_mat4x2 mat4x2; - typedef mediump_mat4x3 mat4x3; - typedef mediump_mat4x4 mat4x4; + typedef mediump_mat2x2 mat2x2; + typedef mediump_mat2x3 mat2x3; + typedef mediump_mat2x4 mat2x4; + typedef mediump_mat3x2 mat3x2; + typedef mediump_mat3x3 mat3x3; + typedef mediump_mat3x4 mat3x4; + typedef mediump_mat4x2 mat4x2; + typedef mediump_mat4x3 mat4x3; + typedef mediump_mat4x4 mat4x4; #elif(defined(GLM_PRECISION_LOWP_FLOAT)) typedef lowp_vec2 vec2; typedef lowp_vec3 vec3; diff --git a/glm/core/type_float.hpp b/glm/core/type_float.hpp index af954270..a9e9c7e3 100644 --- a/glm/core/type_float.hpp +++ b/glm/core/type_float.hpp @@ -36,11 +36,13 @@ namespace detail { class half; - typedef detail::half float16; + typedef half float16; typedef float float32; typedef double float64; }//namespace detail + typedef detail::half half; + #ifdef GLM_USE_HALF_SCALAR typedef detail::half lowp_float_t; #else//GLM_USE_HALF_SCALAR @@ -64,7 +66,7 @@ namespace detail /// /// @see GLSL 4.20.8 specification, section 4.1.4 Floats /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef mediump_float_t mediump_float; + typedef mediump_float_t mediump_float; /// High precision floating-point numbers. /// There is no guarantee on the actual precision. @@ -76,7 +78,7 @@ namespace detail #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) typedef mediump_float float_t; #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) - typedef highp_float float_t; + typedef highp_float float_t; #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) typedef mediump_float float_t; #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT)) diff --git a/glm/core/type_gentype.hpp b/glm/core/type_gentype.hpp index 98952423..9bfa7a94 100644 --- a/glm/core/type_gentype.hpp +++ b/glm/core/type_gentype.hpp @@ -29,8 +29,6 @@ #ifndef glm_core_type_gentype #define glm_core_type_gentype -#include "type_size.hpp" - namespace glm { enum profile @@ -40,6 +38,8 @@ namespace glm simd }; + typedef std::size_t sizeType; + namespace detail { template diff --git a/glm/core/type_half.hpp b/glm/core/type_half.hpp index d0b94cca..9548e338 100644 --- a/glm/core/type_half.hpp +++ b/glm/core/type_half.hpp @@ -29,7 +29,7 @@ #ifndef glm_core_type_half #define glm_core_type_half -#include "_detail.hpp" +#include "setup.hpp" namespace glm{ namespace detail diff --git a/glm/core/type_int.hpp b/glm/core/type_int.hpp index 16c03f8c..e9de84cb 100644 --- a/glm/core/type_int.hpp +++ b/glm/core/type_int.hpp @@ -30,7 +30,6 @@ #define glm_core_type_int #include "setup.hpp" -#include "_detail.hpp" #if(((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))) //#if((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))) diff --git a/glm/core/type_mat2x2.hpp b/glm/core/type_mat2x2.hpp index c8bda944..8e3d2ab8 100644 --- a/glm/core/type_mat2x2.hpp +++ b/glm/core/type_mat2x2.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat2x2 #define glm_core_type_mat2x2 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat2x2 { @@ -258,54 +245,7 @@ namespace detail tmat2x2 const & m, int); } //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 lowp_mat2; - - /// 2 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 mediump_mat2; - - /// 2 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 highp_mat2; - - /// 2 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 lowp_mat2x2; - - /// 2 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 mediump_mat2x2; - - /// 2 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 highp_mat2x2; - - /// @} -}//namespace glm +} //namespace glm #ifndef GLM_EXTERNAL_TEMPLATE #include "type_mat2x2.inl" diff --git a/glm/core/type_mat2x3.hpp b/glm/core/type_mat2x3.hpp index 48e6bce4..baf1b654 100644 --- a/glm/core/type_mat2x3.hpp +++ b/glm/core/type_mat2x3.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat2x3 #define glm_core_type_mat2x3 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat2x3 { @@ -221,34 +208,7 @@ namespace detail tmat2x3 const operator++ ( tmat2x3 const & m, int); - -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 lowp_mat2x3; - - /// 2 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 mediump_mat2x3; - - /// 2 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 highp_mat2x3; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat2x4.hpp b/glm/core/type_mat2x4.hpp index 0adfa4ef..1c672037 100644 --- a/glm/core/type_mat2x4.hpp +++ b/glm/core/type_mat2x4.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat2x4 #define glm_core_type_mat2x4 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat2x4 { @@ -224,33 +211,7 @@ namespace detail tmat2x4 const & m, int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 lowp_mat2x4; - - /// 2 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 mediump_mat2x4; - - /// 2 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 highp_mat2x4; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat3x2.hpp b/glm/core/type_mat3x2.hpp index 1f65c529..777ccca5 100644 --- a/glm/core/type_mat3x2.hpp +++ b/glm/core/type_mat3x2.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat3x2 #define glm_core_type_mat3x2 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat3x2 { @@ -229,33 +216,7 @@ namespace detail tmat3x2 const operator++ ( tmat3x2 const & m, int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 lowp_mat3x2; - - /// 3 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 mediump_mat3x2; - - /// 3 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 highp_mat3x2; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat3x3.hpp b/glm/core/type_mat3x3.hpp index bcca6627..cf7be515 100644 --- a/glm/core/type_mat3x3.hpp +++ b/glm/core/type_mat3x3.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat3x3 #define glm_core_type_mat3x3 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat3x3 { @@ -69,7 +56,7 @@ namespace detail /// @cond DETAIL GLM_FUNC_DECL tmat3x3 _inverse() const; /// @endcond - + private: // Data col_type value[3]; @@ -114,7 +101,7 @@ namespace detail tvec3 const & v1, tvec3 const & v2, tvec3 const & v3); - + // Matrix conversions template GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); @@ -171,7 +158,7 @@ namespace detail tmat3x3 operator+ ( tmat3x3 const & m1, tmat3x3 const & m2); - + template tmat3x3 operator- ( tmat3x3 const & m, @@ -261,54 +248,7 @@ namespace detail tmat3x3 const operator++ ( tmat3x3 const & m, int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 lowp_mat3; - - /// 3 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 mediump_mat3; - - /// 3 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 highp_mat3; - - /// 3 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 lowp_mat3x3; - - /// 3 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 mediump_mat3x3; - - /// 3 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 highp_mat3x3; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat3x4.hpp b/glm/core/type_mat3x4.hpp index 11c7e455..8fed269f 100644 --- a/glm/core/type_mat3x4.hpp +++ b/glm/core/type_mat3x4.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat3x4 #define glm_core_type_mat3x4 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat3x4 { @@ -90,25 +77,25 @@ namespace detail // Conversions template GLM_FUNC_DECL explicit tmat3x4( - U const & x); + U const & x); template - < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3 - > + < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3 + > GLM_FUNC_DECL explicit tmat3x4( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); - template + template GLM_FUNC_DECL explicit tmat3x4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3); - + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3); + // Matrix conversion template GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); @@ -150,24 +137,24 @@ namespace detail }; // Binary operators - template + template tmat3x4 operator+ ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s); - - template - tmat3x4 operator+ ( - tmat3x4 const & m1, - tmat3x4 const & m2); - - template - tmat3x4 operator- ( - tmat3x4 const & m, + tmat3x4 const & m, typename tmat3x4::value_type const & s); - template + template + tmat3x4 operator+ ( + tmat3x4 const & m1, + tmat3x4 const & m2); + + template tmat3x4 operator- ( - tmat3x4 const & m1, + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator- ( + tmat3x4 const & m1, tmat3x4 const & m2); template @@ -175,88 +162,62 @@ namespace detail tmat3x4 const & m, typename tmat3x4::value_type const & s); - template + template tmat3x4 operator* ( - typename tmat3x4::value_type const & s, + typename tmat3x4::value_type const & s, tmat3x4 const & m); template typename tmat3x4::col_type operator* ( - tmat3x4 const & m, + tmat3x4 const & m, typename tmat3x4::row_type const & v); template typename tmat3x4::row_type operator* ( - typename tmat3x4::col_type const & v, + typename tmat3x4::col_type const & v, tmat3x4 const & m); template tmat4x4 operator* ( - tmat3x4 const & m1, + tmat3x4 const & m1, tmat4x3 const & m2); template tmat2x4 operator* ( - tmat3x4 const & m1, + tmat3x4 const & m1, tmat2x3 const & m2); template tmat3x4 operator* ( - tmat3x4 const & m1, + tmat3x4 const & m1, tmat3x3 const & m2); - template + template tmat3x4 operator/ ( - tmat3x4 const & m, + tmat3x4 const & m, typename tmat3x4::value_type const & s); - template + template tmat3x4 operator/ ( - typename tmat3x4::value_type const & s, + typename tmat3x4::value_type const & s, tmat3x4 const & m); // Unary constant operators - template - tmat3x4 const operator- ( + template + tmat3x4 const operator- ( tmat3x4 const & m); template tmat3x4 const operator-- ( - tmat3x4 const & m, + tmat3x4 const & m, int); template tmat3x4 const operator++ ( - tmat3x4 const & m, + tmat3x4 const & m, int); }//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 lowp_mat3x4; - - /// 3 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 mediump_mat3x4; - - /// 3 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 highp_mat3x4; - - /// @} }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat4x2.hpp b/glm/core/type_mat4x2.hpp index 7e237842..99a328f4 100644 --- a/glm/core/type_mat4x2.hpp +++ b/glm/core/type_mat4x2.hpp @@ -29,26 +29,13 @@ #ifndef glm_core_type_mat4x2 #define glm_core_type_mat4x2 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template + template struct tmat4x2 { enum ctor{null}; @@ -94,26 +81,26 @@ namespace detail GLM_FUNC_DECL explicit tmat4x2( U const & x); - template + template < typename X1, typename Y1, typename X2, typename Y2, typename X3, typename Y3, typename X4, typename Y4 - > + > GLM_FUNC_DECL explicit tmat4x2( - X1 const & x1, Y1 const & y1, + X1 const & x1, Y1 const & y1, X2 const & x2, Y2 const & y2, X3 const & x3, Y3 const & y3, X4 const & x4, Y4 const & y4); - template + template GLM_FUNC_DECL explicit tmat4x2( - tvec2 const & v1, + tvec2 const & v1, tvec2 const & v2, tvec2 const & v3, tvec2 const & v4); - + // Matrix conversions template GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); @@ -234,33 +221,7 @@ namespace detail tmat4x2 const operator++ ( tmat4x2 const & m, int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 lowp_mat4x2; - - /// 4 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 mediump_mat4x2; - - /// 4 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 highp_mat4x2; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat4x3.hpp b/glm/core/type_mat4x3.hpp index 8cb40f04..0c51b9da 100644 --- a/glm/core/type_mat4x3.hpp +++ b/glm/core/type_mat4x3.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat4x3 #define glm_core_type_mat4x3 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat4x3 { @@ -95,25 +82,25 @@ namespace detail U const & x); template < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2, - typename X3, typename Y3, typename Z3, - typename X4, typename Y4, typename Z4> + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3, + typename X4, typename Y4, typename Z4> GLM_FUNC_DECL explicit tmat4x3( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3, + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3, X4 const & x4, Y4 const & y4, Z4 const & z4); - template + template GLM_FUNC_DECL explicit tmat4x3( - tvec3 const & v1, + tvec3 const & v1, tvec3 const & v2, tvec3 const & v3, tvec3 const & v4); // Matrix conversions - template + template GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); @@ -153,34 +140,34 @@ namespace detail }; // Binary operators - template + template tmat4x3 operator+ ( - tmat4x3 const & m, + tmat4x3 const & m, typename tmat4x3::value_type const & s); - template + template tmat4x3 operator+ ( - tmat4x3 const & m1, + tmat4x3 const & m1, tmat4x3 const & m2); - template + template tmat4x3 operator- ( - tmat4x3 const & m, + tmat4x3 const & m, typename tmat4x3::value_type const & s); - template + template tmat4x3 operator- ( - tmat4x3 const & m1, + tmat4x3 const & m1, tmat4x3 const & m2); - template + template tmat4x3 operator* ( - tmat4x3 const & m, + tmat4x3 const & m, typename tmat4x3::value_type const & s); - template + template tmat4x3 operator* ( - typename tmat4x3::value_type const & s, + typename tmat4x3::value_type const & s, tmat4x3 const & m); template @@ -188,19 +175,19 @@ namespace detail tmat4x3 const & m, typename tmat4x3::row_type const & v); - template + template typename tmat4x3::row_type operator* ( - typename tmat4x3::col_type const & v, + typename tmat4x3::col_type const & v, tmat4x3 const & m); - template + template tmat2x3 operator* ( - tmat4x3 const & m1, + tmat4x3 const & m1, tmat2x4 const & m2); - template + template tmat3x3 operator* ( - tmat4x3 const & m1, + tmat4x3 const & m1, tmat3x4 const & m2); template @@ -208,9 +195,9 @@ namespace detail tmat4x3 const & m1, tmat4x4 const & m2); - template + template tmat4x3 operator/ ( - tmat4x3 const & m, + tmat4x3 const & m, typename tmat4x3::value_type const & s); template @@ -219,46 +206,20 @@ namespace detail tmat4x3 const & m); // Unary constant operators - template + template tmat4x3 const operator- ( tmat4x3 const & m); - template + template tmat4x3 const operator-- ( - tmat4x3 const & m, + tmat4x3 const & m, int); - template + template tmat4x3 const operator++ ( - tmat4x3 const & m, + tmat4x3 const & m, int); }//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 lowp_mat4x3; - - /// 4 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 mediump_mat4x3; - - /// 4 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 highp_mat4x3; - - /// @} }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_mat4x4.hpp b/glm/core/type_mat4x4.hpp index bde9f3c0..ab33b367 100644 --- a/glm/core/type_mat4x4.hpp +++ b/glm/core/type_mat4x4.hpp @@ -29,25 +29,12 @@ #ifndef glm_core_type_mat4x4 #define glm_core_type_mat4x4 +#include "../fwd.hpp" #include "type_mat.hpp" namespace glm{ namespace detail { - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - template struct tmat4x4 { @@ -101,23 +88,23 @@ namespace detail U const & x); template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3, - typename X4, typename Y4, typename Z4, typename W4> + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3, + typename X4, typename Y4, typename Z4, typename W4> GLM_FUNC_DECL explicit tmat4x4( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); template GLM_FUNC_DECL explicit tmat4x4( - tvec4 const & v1, + tvec4 const & v1, tvec4 const & v2, tvec4 const & v3, tvec4 const & v4); - + // Matrix conversions template GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); @@ -160,21 +147,21 @@ namespace detail }; // Binary operators - template + template tmat4x4 operator+ ( - tmat4x4 const & m, + tmat4x4 const & m, typename tmat4x4::value_type const & s); - template + template tmat4x4 operator+ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::value_type const & s, tmat4x4 const & m); template tmat4x4 operator+ ( tmat4x4 const & m1, tmat4x4 const & m2); - + template tmat4x4 operator- ( tmat4x4 const & m, @@ -182,135 +169,88 @@ namespace detail template tmat4x4 operator- ( - typename tmat4x4::value_type const & s, + typename tmat4x4::value_type const & s, tmat4x4 const & m); - template + template tmat4x4 operator- ( - tmat4x4 const & m1, + tmat4x4 const & m1, tmat4x4 const & m2); - template + template tmat4x4 operator* ( - tmat4x4 const & m, + tmat4x4 const & m, typename tmat4x4::value_type const & s); - template + template tmat4x4 operator* ( - typename tmat4x4::value_type const & s, + typename tmat4x4::value_type const & s, tmat4x4 const & m); - template + template typename tmat4x4::col_type operator* ( - tmat4x4 const & m, + tmat4x4 const & m, typename tmat4x4::row_type const & v); - template + template typename tmat4x4::row_type operator* ( - typename tmat4x4::col_type const & v, + typename tmat4x4::col_type const & v, tmat4x4 const & m); template tmat2x4 operator* ( - tmat4x4 const & m1, + tmat4x4 const & m1, tmat2x4 const & m2); template tmat3x4 operator* ( - tmat4x4 const & m1, + tmat4x4 const & m1, tmat3x4 const & m2); - template + template tmat4x4 operator* ( - tmat4x4 const & m1, + tmat4x4 const & m1, tmat4x4 const & m2); - template + template tmat4x4 operator/ ( - tmat4x4 const & m, + tmat4x4 const & m, typename tmat4x4::value_type const & s); - template + template tmat4x4 operator/ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::value_type const & s, tmat4x4 const & m); - template + template typename tmat4x4::col_type operator/ ( - tmat4x4 const & m, + tmat4x4 const & m, typename tmat4x4::row_type const & v); - template + template typename tmat4x4::row_type operator/ ( - typename tmat4x4::col_type & v, + typename tmat4x4::col_type & v, tmat4x4 const & m); - template + template tmat4x4 operator/ ( - tmat4x4 const & m1, + tmat4x4 const & m1, tmat4x4 const & m2); // Unary constant operators - template + template tmat4x4 const operator- ( tmat4x4 const & m); - template + template tmat4x4 const operator-- ( tmat4x4 const & m, int); - template + template tmat4x4 const operator++ ( tmat4x4 const & m, int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 lowp_mat4; - - /// 4 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 mediump_mat4; - - /// 4 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 highp_mat4; - - /// 4 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 lowp_mat4x4; - - /// 4 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 mediump_mat4x4; - - /// 4 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 highp_mat4x4; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_size.hpp b/glm/core/type_size.hpp deleted file mode 100644 index b7a7c318..00000000 --- a/glm/core/type_size.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_size.hpp -/// @date 2008-10-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_size -#define glm_core_type_size - -#include - -namespace glm{ -namespace detail -{ - //typedef std::size_t size_t; - typedef int sizeType; - -}//namespace detail -}//namespace glm - -#endif//glm_core_type_size diff --git a/glm/core/type_vec1.hpp b/glm/core/type_vec1.hpp index 395cc789..7545691f 100644 --- a/glm/core/type_vec1.hpp +++ b/glm/core/type_vec1.hpp @@ -29,10 +29,8 @@ #ifndef glm_core_type_gentype1 #define glm_core_type_gentype1 +#include "../fwd.hpp" #include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" #include "_swizzle.hpp" namespace glm{ @@ -42,10 +40,6 @@ namespace detail template struct tref2; template struct tref3; template struct tref4; - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; template struct tvec1 @@ -192,16 +186,6 @@ namespace detail GLM_DETAIL_IS_VECTOR(tvec1); - typedef detail::tvec1 highp_vec1_t; - typedef detail::tvec1 mediump_vec1_t; - typedef detail::tvec1 lowp_vec1_t; - typedef detail::tvec1 highp_ivec1_t; - typedef detail::tvec1 mediump_ivec1_t; - typedef detail::tvec1 lowp_ivec1_t; - typedef detail::tvec1 highp_uvec1_t; - typedef detail::tvec1 mediump_uvec1_t; - typedef detail::tvec1 lowp_uvec1_t; - }//namespace detail }//namespace glm diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 8dbc8b64..ebc3a2d4 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -29,21 +29,18 @@ #ifndef glm_core_type_gentype2 #define glm_core_type_gentype2 +#include "../fwd.hpp" #include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" #include "_swizzle.hpp" namespace glm{ namespace detail { + template struct tref1; template struct tref2; template struct tref3; template struct tref4; - template struct tvec3; - template struct tvec4; - + template struct tvec2 { @@ -239,75 +236,7 @@ namespace detail GLM_DETAIL_IS_VECTOR(tvec2); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_vec2; - - /// 2 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_vec2; - - /// 2 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_vec2; - - /// 2 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_ivec2; - - /// 2 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_ivec2; - - /// 2 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_ivec2; - - /// 2 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_uvec2; - - /// 2 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_uvec2; - - /// 2 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_uvec2; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 7cda2d28..43994355 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -29,20 +29,17 @@ #ifndef glm_core_type_gentype3 #define glm_core_type_gentype3 +#include "../fwd.hpp" #include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" #include "_swizzle.hpp" namespace glm{ namespace detail { + template struct tref1; template struct tref2; template struct tref3; template struct tref4; - template struct tvec2; - template struct tvec4; template struct tvec3 @@ -264,75 +261,7 @@ namespace detail }; GLM_DETAIL_IS_VECTOR(tvec3); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_vec3; - - /// 3 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_vec3; - - /// 3 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_vec3; - - /// 3 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_ivec3; - - /// 3 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_ivec3; - - /// 3 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_ivec3; - - /// 3 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_uvec3; - - /// 3 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_uvec3; - - /// 3 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_uvec3; - - /// @} +}//namespace detail }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 88969503..c280b257 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -29,20 +29,17 @@ #ifndef glm_core_type_gentype4 #define glm_core_type_gentype4 +#include "../fwd.hpp" #include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" #include "_swizzle.hpp" namespace glm{ namespace detail { + template struct tref1; template struct tref2; template struct tref3; template struct tref4; - template struct tvec2; - template struct tvec3; template struct tvec4 @@ -322,74 +319,6 @@ namespace detail GLM_DETAIL_IS_VECTOR(tvec4); }//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_vec4; - - /// 4 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_vec4; - - /// 4 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_vec4; - - /// 4 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_ivec4; - - /// 4 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_ivec4; - - /// 4 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_ivec4; - - /// 4 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_uvec4; - - /// 4 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_uvec4; - - /// 4 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_uvec4; - - /// @} }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE