Home | History | Annotate | Download | only in detail
      1 ///////////////////////////////////////////////////////////////////////////////////
      2 /// OpenGL Mathematics (glm.g-truc.net)
      3 ///
      4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
      5 /// Permission is hereby granted, free of charge, to any person obtaining a copy
      6 /// of this software and associated documentation files (the "Software"), to deal
      7 /// in the Software without restriction, including without limitation the rights
      8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
      9 /// copies of the Software, and to permit persons to whom the Software is
     10 /// furnished to do so, subject to the following conditions:
     11 ///
     12 /// The above copyright notice and this permission notice shall be included in
     13 /// all copies or substantial portions of the Software.
     14 ///
     15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     21 /// THE SOFTWARE.
     22 ///
     23 /// @ref core
     24 /// @file glm/core/type_vec.hpp
     25 /// @date 2010-01-26 / 2011-06-15
     26 /// @author Christophe Riccio
     27 ///////////////////////////////////////////////////////////////////////////////////
     28 
     29 #ifndef glm_core_type_vec
     30 #define glm_core_type_vec
     31 
     32 #include "precision.hpp"
     33 #include "type_int.hpp"
     34 
     35 namespace glm{
     36 namespace detail
     37 {
     38 	template <typename T, precision P> struct tvec1;
     39 	template <typename T, precision P> struct tvec2;
     40 	template <typename T, precision P> struct tvec3;
     41 	template <typename T, precision P> struct tvec4;
     42 }//namespace detail
     43 
     44 	typedef detail::tvec1<float, highp>		highp_vec1_t;
     45 	typedef detail::tvec1<float, mediump>	mediump_vec1_t;
     46 	typedef detail::tvec1<float, lowp>		lowp_vec1_t;
     47 	typedef detail::tvec1<int, highp>		highp_ivec1_t;
     48 	typedef detail::tvec1<int, mediump>		mediump_ivec1_t;
     49 	typedef detail::tvec1<int, lowp>		lowp_ivec1_t;
     50 	typedef detail::tvec1<uint, highp>		highp_uvec1_t;
     51 	typedef detail::tvec1<uint, mediump>	mediump_uvec1_t;
     52 	typedef detail::tvec1<uint, lowp>		lowp_uvec1_t;
     53 	typedef detail::tvec1<bool, highp>		highp_bvec1_t;
     54 	typedef detail::tvec1<bool, mediump>	mediump_bvec1_t;
     55 	typedef detail::tvec1<bool, lowp>		lowp_bvec1_t;
     56 
     57 	/// @addtogroup core_precision
     58 	/// @{
     59 
     60 	/// 2 components vector of high single-precision floating-point numbers.
     61 	/// There is no guarantee on the actual precision.
     62 	///
     63 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     64 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
     65 	typedef detail::tvec2<float, highp>		highp_vec2;
     66 
     67 	/// 2 components vector of medium single-precision floating-point numbers.
     68 	/// There is no guarantee on the actual precision.
     69 	///
     70 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     71 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
     72 	typedef detail::tvec2<float, mediump>	mediump_vec2;
     73 
     74 	/// 2 components vector of low single-precision floating-point numbers.
     75 	/// There is no guarantee on the actual precision.
     76 	///
     77 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     78 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
     79 	typedef detail::tvec2<float, lowp>		lowp_vec2;
     80 
     81 	/// 2 components vector of high double-precision floating-point numbers.
     82 	/// There is no guarantee on the actual precision.
     83 	///
     84 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     85 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
     86 	typedef detail::tvec2<double, highp>	highp_dvec2;
     87 
     88 	/// 2 components vector of medium double-precision floating-point numbers.
     89 	/// There is no guarantee on the actual precision.
     90 	///
     91 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     92 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
     93 	typedef detail::tvec2<double, mediump>	mediump_dvec2;
     94 
     95 	/// 2 components vector of low double-precision floating-point numbers.
     96 	/// There is no guarantee on the actual precision.
     97 	///
     98 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
     99 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    100 	typedef detail::tvec2<double, lowp>		lowp_dvec2;
    101 
    102 	/// 2 components vector of high precision signed integer numbers.
    103 	/// There is no guarantee on the actual precision.
    104 	///
    105 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    106 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    107 	typedef detail::tvec2<int, highp>		highp_ivec2;
    108 
    109 	/// 2 components vector of medium precision signed integer numbers.
    110 	/// There is no guarantee on the actual precision.
    111 	///
    112 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    113 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    114 	typedef detail::tvec2<int, mediump>		mediump_ivec2;
    115 
    116 	/// 2 components vector of low precision signed integer numbers.
    117 	/// There is no guarantee on the actual precision.
    118 	///
    119 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    120 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    121 	typedef detail::tvec2<int, lowp>		lowp_ivec2;
    122 
    123 	/// 2 components vector of high precision unsigned integer numbers.
    124 	/// There is no guarantee on the actual precision.
    125 	///
    126 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    127 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    128 	typedef detail::tvec2<uint, highp>		highp_uvec2;
    129 
    130 	/// 2 components vector of medium precision unsigned integer numbers.
    131 	/// There is no guarantee on the actual precision.
    132 	///
    133 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    134 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    135 	typedef detail::tvec2<uint, mediump>	mediump_uvec2;
    136 
    137 	/// 2 components vector of low precision unsigned integer numbers.
    138 	/// There is no guarantee on the actual precision.
    139 	///
    140 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    141 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    142 	typedef detail::tvec2<uint, lowp>		lowp_uvec2;
    143 
    144 	/// 2 components vector of high precision bool numbers.
    145 	/// There is no guarantee on the actual precision.
    146 	///
    147 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    148 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    149 	typedef detail::tvec2<bool, highp>		highp_bvec2;
    150 
    151 	/// 2 components vector of medium precision bool numbers.
    152 	/// There is no guarantee on the actual precision.
    153 	///
    154 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    155 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    156 	typedef detail::tvec2<bool, mediump>	mediump_bvec2;
    157 
    158 	/// 2 components vector of low precision bool numbers.
    159 	/// There is no guarantee on the actual precision.
    160 	///
    161 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    162 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    163 	typedef detail::tvec2<bool, lowp>		lowp_bvec2;
    164 
    165 	/// @}
    166 
    167 
    168 	/// @addtogroup core_precision
    169 	/// @{
    170 
    171 	/// 3 components vector of high single-precision floating-point numbers.
    172 	/// There is no guarantee on the actual precision.
    173 	///
    174 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    175 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    176 	typedef detail::tvec3<float, highp>		highp_vec3;
    177 
    178 	/// 3 components vector of medium single-precision floating-point numbers.
    179 	/// There is no guarantee on the actual precision.
    180 	///
    181 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    182 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    183 	typedef detail::tvec3<float, mediump>	mediump_vec3;
    184 
    185 	/// 3 components vector of low single-precision floating-point numbers.
    186 	/// There is no guarantee on the actual precision.
    187 	///
    188 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    189 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    190 	typedef detail::tvec3<float, lowp>		lowp_vec3;
    191 
    192 	/// 3 components vector of high double-precision floating-point numbers.
    193 	/// There is no guarantee on the actual precision.
    194 	///
    195 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    196 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    197 	typedef detail::tvec3<double, highp>	highp_dvec3;
    198 
    199 	/// 3 components vector of medium double-precision floating-point numbers.
    200 	/// There is no guarantee on the actual precision.
    201 	///
    202 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    203 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    204 	typedef detail::tvec3<double, mediump>	mediump_dvec3;
    205 
    206 	/// 3 components vector of low double-precision floating-point numbers.
    207 	/// There is no guarantee on the actual precision.
    208 	///
    209 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    210 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    211 	typedef detail::tvec3<double, lowp>		lowp_dvec3;
    212 
    213 	/// 3 components vector of high precision signed integer numbers.
    214 	/// There is no guarantee on the actual precision.
    215 	///
    216 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    217 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    218 	typedef detail::tvec3<int, highp>		highp_ivec3;
    219 
    220 	/// 3 components vector of medium precision signed integer numbers.
    221 	/// There is no guarantee on the actual precision.
    222 	///
    223 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    224 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    225 	typedef detail::tvec3<int, mediump>		mediump_ivec3;
    226 
    227 	/// 3 components vector of low precision signed integer numbers.
    228 	/// There is no guarantee on the actual precision.
    229 	///
    230 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    231 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    232 	typedef detail::tvec3<int, lowp>		lowp_ivec3;
    233 
    234 	/// 3 components vector of high precision unsigned integer numbers.
    235 	/// There is no guarantee on the actual precision.
    236 	///
    237 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    238 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    239 	typedef detail::tvec3<uint, highp>		highp_uvec3;
    240 
    241 	/// 3 components vector of medium precision unsigned integer numbers.
    242 	/// There is no guarantee on the actual precision.
    243 	///
    244 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    245 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    246 	typedef detail::tvec3<uint, mediump>	mediump_uvec3;
    247 
    248 	/// 3 components vector of low precision unsigned integer numbers.
    249 	/// There is no guarantee on the actual precision.
    250 	///
    251 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    252 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    253 	typedef detail::tvec3<uint, lowp>		lowp_uvec3;
    254 
    255 	/// 3 components vector of high precision bool numbers.
    256 	///
    257 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    258 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    259 	typedef detail::tvec3<bool, highp>		highp_bvec3;
    260 
    261 	/// 3 components vector of medium precision bool numbers.
    262 	///
    263 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    264 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    265 	typedef detail::tvec3<bool, mediump>	mediump_bvec3;
    266 
    267 	/// 3 components vector of low precision bool numbers.
    268 	///
    269 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    270 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    271 	typedef detail::tvec3<bool, lowp>		lowp_bvec3;
    272 
    273 	/// @}
    274 
    275 	/// @addtogroup core_precision
    276 	/// @{
    277 
    278 	/// 4 components vector of high single-precision floating-point numbers.
    279 	///
    280 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    281 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    282 	typedef detail::tvec4<float, highp>		highp_vec4;
    283 
    284 	/// 4 components vector of medium single-precision floating-point numbers.
    285 	///
    286 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    287 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    288 	typedef detail::tvec4<float, mediump>	mediump_vec4;
    289 
    290 	/// 4 components vector of low single-precision floating-point numbers.
    291 	///
    292 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    293 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    294 	typedef detail::tvec4<float, lowp>		lowp_vec4;
    295 
    296 	/// 4 components vector of high double-precision floating-point numbers.
    297 	///
    298 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    299 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    300 	typedef detail::tvec4<double, highp>	highp_dvec4;
    301 
    302 	/// 4 components vector of medium double-precision floating-point numbers.
    303 	///
    304 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    305 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    306 	typedef detail::tvec4<double, mediump>	mediump_dvec4;
    307 
    308 	/// 4 components vector of low double-precision floating-point numbers.
    309 	///
    310 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    311 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    312 	typedef detail::tvec4<double, lowp>		lowp_dvec4;
    313 
    314 	/// 4 components vector of high precision signed integer numbers.
    315 	///
    316 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    317 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    318 	typedef detail::tvec4<int, highp>		highp_ivec4;
    319 
    320 	/// 4 components vector of medium precision signed integer numbers.
    321 	///
    322 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    323 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    324 	typedef detail::tvec4<int, mediump>		mediump_ivec4;
    325 
    326 	/// 4 components vector of low precision signed integer numbers.
    327 	///
    328 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    329 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    330 	typedef detail::tvec4<int, lowp>		lowp_ivec4;
    331 
    332 	/// 4 components vector of high precision unsigned integer numbers.
    333 	///
    334 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    335 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    336 	typedef detail::tvec4<uint, highp>		highp_uvec4;
    337 
    338 	/// 4 components vector of medium precision unsigned integer numbers.
    339 	///
    340 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    341 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    342 	typedef detail::tvec4<uint, mediump>	mediump_uvec4;
    343 
    344 	/// 4 components vector of low precision unsigned integer numbers.
    345 	///
    346 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    347 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    348 	typedef detail::tvec4<uint, lowp>		lowp_uvec4;
    349 
    350 	/// 4 components vector of high precision bool numbers.
    351 	///
    352 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    353 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    354 	typedef detail::tvec4<bool, highp>		highp_bvec4;
    355 
    356 	/// 4 components vector of medium precision bool numbers.
    357 	///
    358 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    359 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    360 	typedef detail::tvec4<bool, mediump>	mediump_bvec4;
    361 
    362 	/// 4 components vector of low precision bool numbers.
    363 	///
    364 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    365 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
    366 	typedef detail::tvec4<bool, lowp>		lowp_bvec4;
    367 
    368 	/// @}
    369 
    370 	/// @addtogroup core_types
    371 	/// @{
    372 
    373 	//////////////////////////
    374 	// Default float definition
    375 
    376 #if(defined(GLM_PRECISION_LOWP_FLOAT))
    377 	typedef lowp_vec2			vec2;
    378 	typedef lowp_vec3			vec3;
    379 	typedef lowp_vec4			vec4;
    380 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
    381 	typedef mediump_vec2		vec2;
    382 	typedef mediump_vec3		vec3;
    383 	typedef mediump_vec4		vec4;
    384 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
    385 	/// 2 components vector of floating-point numbers.
    386 	///
    387 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    388 	typedef highp_vec2			vec2;
    389 
    390 	//! 3 components vector of floating-point numbers.
    391 	///
    392 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    393 	typedef highp_vec3			vec3;
    394 
    395 	//! 4 components vector of floating-point numbers.
    396 	///
    397 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    398 	typedef highp_vec4			vec4;
    399 #endif//GLM_PRECISION
    400 
    401 	//////////////////////////
    402 	// Default double definition
    403 
    404 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
    405 	typedef lowp_dvec2			dvec2;
    406 	typedef lowp_dvec3			dvec3;
    407 	typedef lowp_dvec4			dvec4;
    408 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
    409 	typedef mediump_dvec2		dvec2;
    410 	typedef mediump_dvec3		dvec3;
    411 	typedef mediump_dvec4		dvec4;
    412 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
    413 	/// 2 components vector of double-precision floating-point numbers.
    414 	///
    415 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    416 	typedef highp_dvec2			dvec2;
    417 
    418 	//! 3 components vector of double-precision floating-point numbers.
    419 	///
    420 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    421 	typedef highp_dvec3			dvec3;
    422 
    423 	//! 4 components vector of double-precision floating-point numbers.
    424 	///
    425 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    426 	typedef highp_dvec4			dvec4;
    427 #endif//GLM_PRECISION
    428 
    429 	//////////////////////////
    430 	// Signed integer definition
    431 
    432 #if(defined(GLM_PRECISION_LOWP_INT))
    433 	typedef lowp_ivec2			ivec2;
    434 	typedef lowp_ivec3			ivec3;
    435 	typedef lowp_ivec4			ivec4;
    436 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
    437 	typedef mediump_ivec2		ivec2;
    438 	typedef mediump_ivec3		ivec3;
    439 	typedef mediump_ivec4		ivec4;
    440 #else //defined(GLM_PRECISION_HIGHP_INT)
    441 	//! 2 components vector of signed integer numbers.
    442 	///
    443 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    444 	typedef highp_ivec2			ivec2;
    445 
    446 	//! 3 components vector of signed integer numbers.
    447 	///
    448 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    449 	typedef highp_ivec3			ivec3;
    450 
    451 	//! 4 components vector of signed integer numbers.
    452 	///
    453 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    454 	typedef highp_ivec4			ivec4;
    455 #endif//GLM_PRECISION
    456 
    457 	//////////////////////////
    458 	// Unsigned integer definition
    459 
    460 #if(defined(GLM_PRECISION_LOWP_UINT))
    461 	typedef lowp_uvec2			uvec2;
    462 	typedef lowp_uvec3			uvec3;
    463 	typedef lowp_uvec4			uvec4;
    464 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
    465 	typedef mediump_uvec2		uvec2;
    466 	typedef mediump_uvec3		uvec3;
    467 	typedef mediump_uvec4		uvec4;
    468 #else //defined(GLM_PRECISION_HIGHP_UINT)
    469 	/// 2 components vector of unsigned integer numbers.
    470 	///
    471 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    472 	typedef highp_uvec2			uvec2;
    473 
    474 	/// 3 components vector of unsigned integer numbers.
    475 	///
    476 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    477 	typedef highp_uvec3			uvec3;
    478 
    479 	/// 4 components vector of unsigned integer numbers.
    480 	///
    481 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    482 	typedef highp_uvec4			uvec4;
    483 #endif//GLM_PRECISION
    484 
    485 	//////////////////////////
    486 	// Boolean definition
    487 
    488 #if(defined(GLM_PRECISION_LOWP_BOOL))
    489 	typedef lowp_bvec2			bvec2;
    490 	typedef lowp_bvec3			bvec3;
    491 	typedef lowp_bvec4			bvec4;
    492 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
    493 	typedef mediump_bvec2		bvec2;
    494 	typedef mediump_bvec3		bvec3;
    495 	typedef mediump_bvec4		bvec4;
    496 #else //defined(GLM_PRECISION_HIGHP_BOOL)
    497 	//! 2 components vector of boolean.
    498 	///
    499 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    500 	typedef highp_bvec2			bvec2;
    501 
    502 	//! 3 components vector of boolean.
    503 	///
    504 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    505 	typedef highp_bvec3			bvec3;
    506 
    507 	//! 4 components vector of boolean.
    508 	///
    509 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
    510 	typedef highp_bvec4			bvec4;
    511 #endif//GLM_PRECISION
    512 
    513 	/// @}
    514 }//namespace glm
    515 
    516 #endif//glm_core_type_vec
    517