Split headers to improve compilation time #670

This commit is contained in:
Christophe Riccio 2018-08-01 18:24:31 +02:00
parent 428a468d13
commit e1d21258e7
54 changed files with 1439 additions and 640 deletions

24
glm/bvec2.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/bvec2.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_BOOL))
typedef vec<2, bool, lowp> bvec2;
# elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef vec<2, bool, mediump> bvec2;
# else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 2 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<2, bool, highp> bvec2;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/bvec2_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/bvec2_precision.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 2 components vector of high qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, bool, highp> highp_bvec2;
/// 2 components vector of medium qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, bool, mediump> mediump_bvec2;
/// 2 components vector of low qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, bool, lowp> lowp_bvec2;
/// @}
}//namespace glm

24
glm/bvec3.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/bvec3.hpp
#pragma once
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_BOOL))
typedef vec<3, bool, lowp> bvec3;
# elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef vec<3, bool, mediump> bvec3;
# else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 3 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<3, bool, highp> bvec3;
# endif//GLM_PRECISION
/// @}
}//namespace glm

35
glm/bvec3_precision.hpp Normal file
View File

@ -0,0 +1,35 @@
/// @ref core
/// @file glm/bvec3_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 3 components vector of high qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, bool, highp> highp_bvec3;
/// 3 components vector of medium qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, bool, mediump> mediump_bvec3;
/// 3 components vector of low qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, bool, lowp> lowp_bvec3;
/// @}
}//namespace glm

24
glm/bvec4.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/bvec4.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_BOOL))
typedef vec<4, bool, lowp> bvec4;
# elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef vec<4, bool, mediump> bvec4;
# else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 4 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<4, bool, highp> bvec4;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/bvec4_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/bvec4_precision.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 4 components vector of high qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, highp> highp_bvec4;
/// 4 components vector of medium qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, mediump> mediump_bvec4;
/// 4 components vector of low qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, lowp> lowp_bvec4;
/// @}
}//namespace glm

View File

@ -4,466 +4,4 @@
#pragma once
#include "qualifier.hpp"
#include "type_int.hpp"
#include "compute_vector_relational.hpp"
namespace glm
{
#if GLM_HAS_TEMPLATE_ALIASES
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
template <typename T, qualifier Q = defaultp> using tvec4 = vec<4, T, Q>;
#endif//GLM_HAS_TEMPLATE_ALIASES
/// @addtogroup core_precision
/// @{
/// 2 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, float, highp> highp_vec2;
/// 2 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, float, mediump> mediump_vec2;
/// 2 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, float, lowp> lowp_vec2;
/// 2 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, double, highp> highp_dvec2;
/// 2 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, double, mediump> mediump_dvec2;
/// 2 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, double, lowp> lowp_dvec2;
/// 2 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, int, highp> highp_ivec2;
/// 2 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, int, mediump> mediump_ivec2;
/// 2 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, int, lowp> lowp_ivec2;
/// 2 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, uint, highp> highp_uvec2;
/// 2 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, uint, mediump> mediump_uvec2;
/// 2 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, uint, lowp> lowp_uvec2;
/// 2 components vector of high qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, bool, highp> highp_bvec2;
/// 2 components vector of medium qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, bool, mediump> mediump_bvec2;
/// 2 components vector of low qualifier bool numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<2, bool, lowp> lowp_bvec2;
/// @}
/// @addtogroup core_precision
/// @{
/// 3 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, float, highp> highp_vec3;
/// 3 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, float, mediump> mediump_vec3;
/// 3 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, float, lowp> lowp_vec3;
/// 3 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, highp> highp_dvec3;
/// 3 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, mediump> mediump_dvec3;
/// 3 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, lowp> lowp_dvec3;
/// 3 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, int, highp> highp_ivec3;
/// 3 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, int, mediump> mediump_ivec3;
/// 3 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, int, lowp> lowp_ivec3;
/// 3 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, uint, highp> highp_uvec3;
/// 3 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, uint, mediump> mediump_uvec3;
/// 3 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, uint, lowp> lowp_uvec3;
/// 3 components vector of high qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, bool, highp> highp_bvec3;
/// 3 components vector of medium qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, bool, mediump> mediump_bvec3;
/// 3 components vector of low qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, bool, lowp> lowp_bvec3;
/// @}
/// @addtogroup core_precision
/// @{
/// 4 components vector of high single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, highp> highp_vec4;
/// 4 components vector of medium single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, mediump> mediump_vec4;
/// 4 components vector of low single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, lowp> lowp_vec4;
/// 4 components vector of high double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, double, highp> highp_dvec4;
/// 4 components vector of medium double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, double, mediump> mediump_dvec4;
/// 4 components vector of low double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, double, lowp> lowp_dvec4;
/// 4 components vector of high qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, highp> highp_ivec4;
/// 4 components vector of medium qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, mediump> mediump_ivec4;
/// 4 components vector of low qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, lowp> lowp_ivec4;
/// 4 components vector of high qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, highp> highp_uvec4;
/// 4 components vector of medium qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, mediump> mediump_uvec4;
/// 4 components vector of low qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, lowp> lowp_uvec4;
/// 4 components vector of high qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, highp> highp_bvec4;
/// 4 components vector of medium qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, mediump> mediump_bvec4;
/// 4 components vector of low qualifier bool numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, bool, lowp> lowp_bvec4;
/// @}
/// @addtogroup core_types
/// @{
// -- Default float definition --
#if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef lowp_vec2 vec2;
typedef lowp_vec3 vec3;
typedef lowp_vec4 vec4;
#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef mediump_vec2 vec2;
typedef mediump_vec3 vec3;
typedef mediump_vec4 vec4;
#else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 2 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_vec2 vec2;
//! 3 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_vec3 vec3;
//! 4 components vector of floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_vec4 vec4;
#endif//GLM_PRECISION
// -- Default double definition --
#if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef lowp_dvec2 dvec2;
typedef lowp_dvec3 dvec3;
typedef lowp_dvec4 dvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef mediump_dvec2 dvec2;
typedef mediump_dvec3 dvec3;
typedef mediump_dvec4 dvec4;
#else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 2 components vector of double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec2 dvec2;
//! 3 components vector of double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec3 dvec3;
//! 4 components vector of double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec4 dvec4;
#endif//GLM_PRECISION
// -- Signed integer definition --
#if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_ivec2 ivec2;
typedef lowp_ivec3 ivec3;
typedef lowp_ivec4 ivec4;
#elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef mediump_ivec2 ivec2;
typedef mediump_ivec3 ivec3;
typedef mediump_ivec4 ivec4;
#else //defined(GLM_PRECISION_HIGHP_INT)
/// 2 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_ivec2 ivec2;
/// 3 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_ivec3 ivec3;
/// 4 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_ivec4 ivec4;
#endif//GLM_PRECISION
// -- Unsigned integer definition --
#if(defined(GLM_PRECISION_LOWP_UINT))
typedef lowp_uvec2 uvec2;
typedef lowp_uvec3 uvec3;
typedef lowp_uvec4 uvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef mediump_uvec2 uvec2;
typedef mediump_uvec3 uvec3;
typedef mediump_uvec4 uvec4;
#else //defined(GLM_PRECISION_HIGHP_UINT)
/// 2 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_uvec2 uvec2;
/// 3 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_uvec3 uvec3;
/// 4 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_uvec4 uvec4;
#endif//GLM_PRECISION
// -- Boolean definition --
#if(defined(GLM_PRECISION_LOWP_BOOL))
typedef lowp_bvec2 bvec2;
typedef lowp_bvec3 bvec3;
typedef lowp_bvec4 bvec4;
#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef mediump_bvec2 bvec2;
typedef mediump_bvec3 bvec3;
typedef mediump_bvec4 bvec4;
#else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 2 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_bvec2 bvec2;
/// 3 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_bvec3 bvec3;
/// 4 components vector of boolean.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_bvec4 bvec4;
#endif//GLM_PRECISION
/// @}
}//namespace glm

24
glm/dvec2.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/dvec2.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef vec<2, double, lowp> dvec2;
# elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef vec<2, double, mediump> dvec2;
# else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 2 components vector of double-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<2, double, highp> dvec2;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/dvec2_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/dvec2_precision.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 2 components vector of high double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, double, highp> highp_dvec2;
/// 2 components vector of medium double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, double, mediump> mediump_dvec2;
/// 2 components vector of low double-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, double, lowp> lowp_dvec2;
/// @}
}//namespace glm

24
glm/dvec3.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/dvec3.hpp
#pragma once
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef vec<3, double, lowp> dvec3;
# elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef vec<3, double, mediump> dvec3;
# else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 3 components vector of double-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<3, double, highp> dvec3;
# endif//GLM_PRECISION
/// @}
}//namespace glm

35
glm/dvec3_precision.hpp Normal file
View File

@ -0,0 +1,35 @@
/// @ref core
/// @file glm/dvec3_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 3 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, highp> highp_dvec3;
/// 3 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, mediump> mediump_dvec3;
/// 3 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<3, double, lowp> lowp_dvec3;
/// @}
}//namespace glm

24
glm/dvec4.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/dvec4.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef vec<4, double, lowp> dvec4;
# elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef vec<4, double, mediump> dvec4;
# else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 4 components vector of double-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<4, double, highp> dvec4;
# endif//GLM_PRECISION
/// @}
}//namespace glm

35
glm/dvec4_precision.hpp Normal file
View File

@ -0,0 +1,35 @@
/// @ref core
/// @file glm/dvec4_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 4 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<4, double, highp> highp_dvec4;
/// 4 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<4, double, mediump> mediump_dvec4;
/// 4 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier.
///
/// @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>
/// @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>
typedef vec<4, double, lowp> lowp_dvec4;
/// @}
}//namespace glm

38
glm/ext/bvec1.hpp Normal file
View File

@ -0,0 +1,38 @@
/// @ref ext_bvec1
/// @file glm/ext/bvec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_bvec1 GLM_EXT_bvec1
/// @ingroup ext
///
/// Include <glm/ext/bvec1.hpp> to use the features of this extension.
///
/// Expose bvec1 type.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_bvec1 extension included")
#endif
namespace glm
{
/// @addtogroup ext_bvec1
/// @{
# if(defined(GLM_PRECISION_LOWP_BOOL))
typedef vec<1, bool, lowp> bvec1;
# elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef vec<1, bool, mediump> bvec1;
# else //defined(GLM_PRECISION_HIGHP_BOOL)
/// 1 components vector of boolean.
///
/// @see ext_bvec1 extension.
typedef vec<1, bool, highp> bvec1;
# endif//GLM_PRECISION
/// @}
}//namespace glm

View File

@ -0,0 +1,42 @@
/// @ref ext_bvec1_precision
/// @file glm/ext/bvec1_precision.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_bvec1_precision GLM_EXT_bvec1_precision
/// @ingroup ext
///
/// Include <glm/ext/bvec1_precision.hpp> to use the features of this extension.
///
/// Add Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_bvec1_precision extension included")
#endif
namespace glm
{
/// @addtogroup ext_bvec1_precision
/// @{
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, highp> highp_bvec1;
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, mediump> mediump_bvec1;
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, lowp> lowp_bvec1;
/// @}
}//namespace glm

38
glm/ext/dvec1.hpp Normal file
View File

@ -0,0 +1,38 @@
/// @ref ext_dvec1
/// @file glm/ext/dvec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_dvec1 GLM_EXT_dvec1
/// @ingroup ext
///
/// Include <glm/ext/dvec1.hpp> to use the features of this extension.
///
/// Expose dvec1 vector type.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_dvec1 extension included")
#endif
namespace glm
{
/// @addtogroup ext_dvec1
/// @{
# if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef vec<1, double, lowp> dvec1;
# elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef vec<1, double, mediump> dvec1;
# else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 1 components vector of double-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<1, double, highp> dvec1;
# endif//GLM_PRECISION
/// @}
}//namespace glm

View File

@ -0,0 +1,42 @@
/// @ref ext_dvec1_precision
/// @file glm/ext/dvec1_precision.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_dvec1_precision GLM_EXT_dvec1_precision
/// @ingroup ext
///
/// Include <glm/ext/fvec1_precision.hpp> to use the features of this extension.
///
/// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_dvec1_precision extension included")
#endif
namespace glm
{
/// @addtogroup ext_dvec1_precision
/// @{
/// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
///
/// @see ext_dvec1_precision
typedef vec<1, double, highp> highp_dvec1;
/// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
///
/// @see ext_dvec1_precision
typedef vec<1, double, mediump> mediump_dvec1;
/// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
///
/// @see ext_dvec1_precision
typedef vec<1, double, lowp> lowp_dvec1;
/// @}
}//namespace glm

38
glm/ext/fvec1.hpp Normal file
View File

@ -0,0 +1,38 @@
/// @ref ext_vec1
/// @file glm/ext/vec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_vec1 GLM_EXT_fvec1
/// @ingroup ext
///
/// Include <glm/ext/vec1.hpp> to use the features of this extension.
///
/// Expose vec1 vector type.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_fvec1 extension included")
#endif
namespace glm
{
/// @addtogroup ext_fvec1
/// @{
# if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef vec<1, float, lowp> vec1;
# elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef vec<1, float, mediump> vec1;
# else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 1 components vector of single-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<1, float, highp> vec1;
# endif//GLM_PRECISION
/// @}
}//namespace glm

View File

@ -0,0 +1,42 @@
/// @ref ext_fvec1_precision
/// @file glm/ext/fvec1_precision.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_fvec1_precision GLM_EXT_fvec1_precision
/// @ingroup ext
///
/// Include <glm/ext/fvec1_precision.hpp> to use the features of this extension.
///
/// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_fvec1_precision extension included")
#endif
namespace glm
{
/// @addtogroup ext_fvec1_precision
/// @{
/// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
///
/// @see ext_fvec1_precision
typedef vec<1, float, highp> highp_vec1;
/// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
///
/// @see ext_fvec1_precision
typedef vec<1, float, mediump> mediump_vec1;
/// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
///
/// @see ext_fvec1_precision
typedef vec<1, float, lowp> lowp_vec1;
/// @}
}//namespace glm

39
glm/ext/ivec1.hpp Normal file
View File

@ -0,0 +1,39 @@
/// @ref ext_ivec1
/// @file glm/ext/ivec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_ivec1 GLM_EXT_ivec1
/// @ingroup ext
///
/// Include <glm/ext/ivec1.hpp> to use the features of this extension.
///
/// Exposes ivec1 vector type.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_ivec1 extension included")
#endif
namespace glm
{
/// @addtogroup ext_ivec1
/// @{
# if(defined(GLM_PRECISION_LOWP_INT))
typedef vec<1, int, lowp> ivec1;
# elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef vec<1, int, mediump> ivec1;
#else //defined(GLM_PRECISION_HIGHP_INT)
/// 1 component vector of signed integer numbers.
///
/// @see ext_ivec1 extension.
typedef vec<1, int, highp> ivec1;
# endif//GLM_PRECISION
/// @}
}//namespace glm

View File

@ -0,0 +1,42 @@
/// @ref ext_ivec1_precision
/// @file glm/ext/ivec1_precision.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_ivec1_precision GLM_EXT_ivec1_precision
/// @ingroup ext
///
/// Include <glm/ext/ivec1_precision.hpp> to use the features of this extension.
///
/// Add Exposes highp_ivec1, mediump_ivec1 and lowp_ivec1 types.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_uvec1_precision extension included")
#endif
namespace glm
{
/// @addtogroup ext_ivec1_precision
/// @{
/// 1 component vector of signed integer values.
///
/// @see ext_ivec1_precision
typedef vec<1, int, highp> highp_ivec1;
/// 1 component vector of signed integer values.
///
/// @see ext_ivec1_precision
typedef vec<1, int, mediump> mediump_ivec1;
/// 1 component vector of signed integer values.
///
/// @see ext_ivec1_precision
typedef vec<1, int, lowp> lowp_ivec1;
/// @}
}//namespace glm

39
glm/ext/uvec1.hpp Normal file
View File

@ -0,0 +1,39 @@
/// @ref ext_uvec1
/// @file glm/ext/uvec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_uvec1 GLM_EXT_uvec1
/// @ingroup ext
///
/// Include <glm/ext/uvec1.hpp> to use the features of this extension.
///
/// Exposes uvec1 vector type.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_uvec1 extension included")
#endif
namespace glm
{
/// @addtogroup ext_uvec1
/// @{
# if(defined(GLM_PRECISION_LOWP_INT))
typedef vec<1, uint, lowp> uvec1;
# elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef vec<1, uint, mediump> uvec1;
#else //defined(GLM_PRECISION_HIGHP_INT)
/// 1 component vector of unsigned integer numbers.
///
/// @see ext_uvec1 extension.
typedef vec<1, uint, highp> uvec1;
# endif//GLM_PRECISION
/// @}
}//namespace glm

View File

@ -0,0 +1,42 @@
/// @ref ext_uvec1_precision
/// @file glm/ext/uvec1_precision.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_uvec1_precision GLM_EXT_uvec1_precision
/// @ingroup ext
///
/// Include <glm/ext/uvec1_precision.hpp> to use the features of this extension.
///
/// Add Exposes highp_uvec1, mediump_uvec1 and lowp_uvec1 types.
#pragma once
#include "../detail/type_vec1.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_uvec1_precision extension included")
#endif
namespace glm
{
/// @addtogroup ext_uvec1_precision
/// @{
/// 1 component vector of unsigned integer values.
///
/// @see ext_vec1
typedef vec<1, uint, highp> highp_uvec1;
/// 1 component vector of unsigned integer values.
///
/// @see ext_vec1
typedef vec<1, uint, mediump> mediump_uvec1;
/// 1 component vector of unsigned integer values.
///
/// @see ext_vec1
typedef vec<1, uint, lowp> lowp_uvec1;
/// @}
}//namespace glm

View File

@ -1,171 +1,21 @@
/// @ref ext_vec1
/// @file glm/ext/vec1.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_vec1 GLM_EXT_vec1
/// @ingroup ext
///
/// Include <glm/ext/vec1.hpp> to use the features of this extension.
///
/// Add vec1, ivec1, uvec1 and bvec1 types.
/// @ref core
/// @file glm/vec1.hpp
#pragma once
#include "../detail/type_vec1.hpp"
#include <cstddef>
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_vec1 extension included")
#endif
#include "bvec1.hpp"
#include "bvec1_precision.hpp"
#include "fvec1.hpp"
#include "fvec1_precision.hpp"
#include "dvec1.hpp"
#include "dvec1_precision.hpp"
#include "ivec1.hpp"
#include "ivec1_precision.hpp"
#include "uvec1.hpp"
#include "uvec1_precision.hpp"
namespace glm
{
/// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, float, highp> highp_vec1;
/// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, float, mediump> mediump_vec1;
/// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, float, lowp> lowp_vec1;
/// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, double, highp> highp_dvec1;
/// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, double, mediump> mediump_dvec1;
/// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
///
/// @see ext_vec1
typedef vec<1, double, lowp> lowp_dvec1;
/// 1 component vector of signed integer numbers.
///
/// @see ext_vec1
typedef vec<1, int, highp> highp_ivec1;
/// 1 component vector of signed integer numbers.
///
/// @see ext_vec1
typedef vec<1, int, mediump> mediump_ivec1;
/// 1 component vector of signed integer numbers.
///
/// @see ext_vec1
typedef vec<1, int, lowp> lowp_ivec1;
/// 1 component vector of unsigned integer numbers.
///
/// @see ext_vec1
typedef vec<1, uint, highp> highp_uvec1;
/// 1 component vector of unsigned integer numbers.
///
/// @see ext_vec1
typedef vec<1, uint, mediump> mediump_uvec1;
/// 1 component vector of unsigned integer numbers.
///
/// @see ext_vec1
typedef vec<1, uint, lowp> lowp_uvec1;
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, highp> highp_bvec1;
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, mediump> mediump_bvec1;
/// 1 component vector of bool values.
///
/// @see ext_vec1
typedef vec<1, bool, lowp> lowp_bvec1;
#if GLM_HAS_TEMPLATE_ALIASES
# if GLM_HAS_TEMPLATE_ALIASES
template <typename T, qualifier Q = defaultp> using tvec1 = vec<1, T, Q>;
#endif//GLM_HAS_TEMPLATE_ALIASES
//////////////////////////
// vec1 definition
#if(defined(GLM_PRECISION_HIGHP_BOOL))
typedef highp_bvec1 bvec1;
#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
typedef mediump_bvec1 bvec1;
#elif(defined(GLM_PRECISION_LOWP_BOOL))
typedef lowp_bvec1 bvec1;
#else
/// 1 component vector of boolean.
/// @see gtc_vec1 extension.
typedef highp_bvec1 bvec1;
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_HIGHP_FLOAT))
typedef highp_vec1 vec1;
#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef mediump_vec1 vec1;
#elif(defined(GLM_PRECISION_LOWP_FLOAT))
typedef lowp_vec1 vec1;
#else
/// 1 component vector of floating-point numbers.
/// @see gtc_vec1 extension.
typedef highp_vec1 vec1;
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_HIGHP_DOUBLE))
typedef highp_dvec1 dvec1;
#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
typedef mediump_dvec1 dvec1;
#elif(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef lowp_dvec1 dvec1;
#else
/// 1 component vector of floating-point numbers.
/// @see gtc_vec1 extension.
typedef highp_dvec1 dvec1;
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_HIGHP_INT))
typedef highp_ivec1 ivec1;
#elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef mediump_ivec1 ivec1;
#elif(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_ivec1 ivec1;
#else
/// 1 component vector of signed integer numbers.
/// @see gtc_vec1 extension.
typedef highp_ivec1 ivec1;
#endif//GLM_PRECISION
#if(defined(GLM_PRECISION_HIGHP_UINT))
typedef highp_uvec1 uvec1;
#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef mediump_uvec1 uvec1;
#elif(defined(GLM_PRECISION_LOWP_UINT))
typedef lowp_uvec1 uvec1;
#else
/// 1 component vector of unsigned integer numbers.
/// @see gtc_vec1 extension.
typedef highp_uvec1 uvec1;
#endif//GLM_PRECISION
/// @}
# endif
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE
#include "../detail/type_vec1.hpp"
#endif//GLM_EXTERNAL_TEMPLATE

24
glm/fvec2.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/fvec2.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef vec<2, float, lowp> vec2;
# elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef vec<2, float, mediump> vec2;
# else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 2 components vector of single-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<2, float, highp> vec2;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/fvec2_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/fvec2_precision.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 2 components vector of high single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, float, highp> highp_vec2;
/// 2 components vector of medium single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, float, mediump> mediump_vec2;
/// 2 components vector of low single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, float, lowp> lowp_vec2;
/// @}
}//namespace glm

24
glm/fvec3.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/fvec3.hpp
#pragma once
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef vec<3, float, lowp> vec3;
# elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef vec<3, float, mediump> vec3;
# else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 3 components vector of single-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<3, float, highp> vec3;
# endif//GLM_PRECISION
/// @}
}//namespace glm

32
glm/fvec3_precision.hpp Normal file
View File

@ -0,0 +1,32 @@
/// @ref core
/// @file glm/fvec3_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 3 components vector of high single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, float, highp> highp_vec3;
/// 3 components vector of medium single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, float, mediump> mediump_vec3;
/// 3 components vector of low single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, float, lowp> lowp_vec3;
/// @}
}//namespace glm

24
glm/fvec4.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/fvec4.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef vec<4, float, lowp> vec4;
# elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
typedef vec<4, float, mediump> vec4;
# else //defined(GLM_PRECISION_HIGHP_FLOAT)
/// 4 components vector of single-precision floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<4, float, highp> vec4;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/fvec4_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/fvec4_precision.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 4 components vector of high single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, highp> highp_vec4;
/// 4 components vector of medium single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, mediump> mediump_vec4;
/// 4 components vector of low single-qualifier floating-point numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, float, lowp> lowp_vec4;
/// @}
}//namespace glm

24
glm/ivec2.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/ivec2.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_INT))
typedef vec<2, int, lowp> ivec2;
# elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef vec<2, int, mediump> ivec2;
# else //defined(GLM_PRECISION_HIGHP_INT)
/// 2 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<2, int, highp> ivec2;
# endif//GLM_PRECISION
/// @}
}//namespace glm

32
glm/ivec2_precision.hpp Normal file
View File

@ -0,0 +1,32 @@
/// @ref core
/// @file glm/ivec2_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 2 components vector of high qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, int, highp> highp_ivec2;
/// 2 components vector of medium qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, int, mediump> mediump_ivec2;
/// 2 components vector of low qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, int, lowp> lowp_ivec2;
/// @}
}//namespace glm

24
glm/ivec3.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/ivec3.hpp
#pragma once
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_INT))
typedef vec<3, int, lowp> ivec3;
# elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef vec<3, int, mediump> ivec3;
# else //defined(GLM_PRECISION_HIGHP_INT)
/// 3 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<3, int, highp> ivec3;
# endif//GLM_PRECISION
/// @}
}//namespace glm

32
glm/ivec3_precision.hpp Normal file
View File

@ -0,0 +1,32 @@
/// @ref core
/// @file glm/ivec3_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 3 components vector of high qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, int, highp> highp_ivec3;
/// 3 components vector of medium qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, int, mediump> mediump_ivec3;
/// 3 components vector of low qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, int, lowp> lowp_ivec3;
/// @}
}//namespace glm

24
glm/ivec4.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/ivec4.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_INT))
typedef vec<4, int, lowp> ivec4;
# elif(defined(GLM_PRECISION_MEDIUMP_INT))
typedef vec<4, int, mediump> ivec4;
# else //defined(GLM_PRECISION_HIGHP_INT)
/// 4 components vector of signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<4, int, highp> ivec4;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/ivec4_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/ivec4_precision.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 4 components vector of high qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, highp> highp_ivec4;
/// 4 components vector of medium qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, mediump> mediump_ivec4;
/// 4 components vector of low qualifier signed integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, int, lowp> lowp_ivec4;
/// @}
}//namespace glm

View File

@ -13,8 +13,9 @@
#pragma once
#include "detail/type_vec2.hpp"
#include "detail/type_vec4.hpp"
#include "uvec2.hpp"
#include "fvec2.hpp"
#include "fvec4.hpp"
namespace glm
{

24
glm/uvec2.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/uvec2.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_UINT))
typedef vec<2, uint, lowp> uvec2;
# elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef vec<2, uint, mediump> uvec2;
# else //defined(GLM_PRECISION_HIGHP_UINT)
/// 2 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<2, uint, highp> uvec2;
# endif//GLM_PRECISION
/// @}
}//namespace glm

31
glm/uvec2_precision.hpp Normal file
View File

@ -0,0 +1,31 @@
/// @ref core
/// @file glm/uvec2_precision.hpp
#pragma once
#include "detail/type_vec2.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 2 components vector of high qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, uint, highp> highp_uvec2;
/// 2 components vector of medium qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, uint, mediump> mediump_uvec2;
/// 2 components vector of low qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<2, uint, lowp> lowp_uvec2;
/// @}
}//namespace glm

24
glm/uvec3.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/uvec3.hpp
#pragma once
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_UINT))
typedef vec<3, uint, lowp> uvec3;
# elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef vec<3, uint, mediump> uvec3;
# else //defined(GLM_PRECISION_HIGHP_UINT)
/// 3 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<3, uint, highp> uvec3;
# endif//GLM_PRECISION
/// @}
}//namespace glm

32
glm/uvec3_precision.hpp Normal file
View File

@ -0,0 +1,32 @@
/// @ref core
/// @file glm/uvec3_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec3.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 3 components vector of high qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, uint, highp> highp_uvec3;
/// 3 components vector of medium qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, uint, mediump> mediump_uvec3;
/// 3 components vector of low qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<3, uint, lowp> lowp_uvec3;
/// @}
}//namespace glm

24
glm/uvec4.hpp Normal file
View File

@ -0,0 +1,24 @@
/// @ref core
/// @file glm/uvec4.hpp
#pragma once
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core
/// @{
# if(defined(GLM_PRECISION_LOWP_UINT))
typedef vec<4, uint, lowp> uvec4;
# elif(defined(GLM_PRECISION_MEDIUMP_UINT))
typedef vec<4, uint, mediump> uvec4;
# else //defined(GLM_PRECISION_HIGHP_UINT)
/// 4 components vector of unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef vec<4, uint, highp> uvec4;
# endif//GLM_PRECISION
/// @}
}//namespace glm

32
glm/uvec4_precision.hpp Normal file
View File

@ -0,0 +1,32 @@
/// @ref core
/// @file glm/uvec4_precision.hpp
#pragma once
#include "detail/setup.hpp"
#include "detail/type_vec4.hpp"
namespace glm
{
/// @addtogroup core_precision
/// @{
/// 4 components vector of high qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, highp> highp_uvec4;
/// 4 components vector of medium qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, mediump> mediump_uvec4;
/// 4 components vector of low qualifier unsigned integer numbers.
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
/// @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>
typedef vec<4, uint, lowp> lowp_uvec4;
/// @}
}//namespace glm

View File

@ -1,8 +1,21 @@
/// @ref core
/// @file glm/vec2.hpp
#include "detail/setup.hpp"
#pragma once
#include "bvec2.hpp"
#include "bvec2_precision.hpp"
#include "fvec2.hpp"
#include "fvec2_precision.hpp"
#include "dvec2.hpp"
#include "dvec2_precision.hpp"
#include "ivec2.hpp"
#include "ivec2_precision.hpp"
#include "uvec2.hpp"
#include "uvec2_precision.hpp"
#include "detail/type_vec2.hpp"
namespace glm
{
# if GLM_HAS_TEMPLATE_ALIASES
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
# endif
}//namespace glm

View File

@ -1,8 +1,22 @@
/// @ref core
/// @file glm/vec3.hpp
#include "detail/setup.hpp"
#pragma once
#include "bvec3.hpp"
#include "bvec3_precision.hpp"
#include "fvec3.hpp"
#include "fvec3_precision.hpp"
#include "dvec3.hpp"
#include "dvec3_precision.hpp"
#include "ivec3.hpp"
#include "ivec3_precision.hpp"
#include "uvec3.hpp"
#include "uvec3_precision.hpp"
namespace glm
{
# if GLM_HAS_TEMPLATE_ALIASES
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
# endif
}//namespace glm
#include "detail/type_vec3.hpp"

View File

@ -1,8 +1,22 @@
/// @ref core
/// @file glm/vec4.hpp
#include "detail/setup.hpp"
#pragma once
#include "bvec4.hpp"
#include "bvec4_precision.hpp"
#include "fvec4.hpp"
#include "fvec4_precision.hpp"
#include "dvec4.hpp"
#include "dvec4_precision.hpp"
#include "ivec4.hpp"
#include "ivec4_precision.hpp"
#include "uvec4.hpp"
#include "uvec4_precision.hpp"
namespace glm
{
# if GLM_HAS_TEMPLATE_ALIASES
template <typename T, qualifier Q = defaultp> using tvec4 = vec<4, T, Q>;
# endif
}//namespace glm
#include "detail/type_vec4.hpp"

View File

@ -65,6 +65,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
- Redesigned constexpr support which excludes both SIMD and constexpr #783
- Added detection of Visual C++ 2017 toolsets
- Added identity functions #765
- Split headers to improve compilation time #670
#### Fixes:
- Fixed build problems due to printf and std::clock_t #778

View File

@ -4,6 +4,11 @@
#include <glm/gtc/constants.hpp>
#include <glm/gtc/vec1.hpp>
#include <glm/gtc/random.hpp>
#include <glm/ivec4.hpp>
#include <glm/dvec4.hpp>
#include <glm/vec4.hpp>
#include <glm/vec3.hpp>
#include <glm/vec2.hpp>
#include <vector>
#include <cstdio>
#include <cmath>
@ -18,7 +23,7 @@ namespace floor_
{
static int test()
{
int Error(0);
int Error = 0;
{
float A = 1.1f;

View File

@ -2,7 +2,13 @@
#include <glm/trigonometric.hpp>
#include <glm/vector_relational.hpp>
#include <glm/ext/vector_relational.hpp>
#include <glm/gtc/vec1.hpp>
#include <glm/ext/fvec1.hpp>
#include <glm/fvec2.hpp>
#include <glm/fvec3.hpp>
#include <glm/fvec4.hpp>
#include <glm/dvec2.hpp>
#include <glm/dvec3.hpp>
#include <glm/dvec4.hpp>
#include <limits>
namespace length

View File

@ -1,6 +1,11 @@
#include <glm/integer.hpp>
#include <glm/vector_relational.hpp>
#include <glm/gtc/vec1.hpp>
#include <glm/ivec2.hpp>
#include <glm/ivec3.hpp>
#include <glm/ivec4.hpp>
#include <glm/uvec2.hpp>
#include <glm/uvec3.hpp>
#include <glm/uvec4.hpp>
#include <vector>
#include <ctime>
#include <cstdio>

View File

@ -1,3 +1,4 @@
glmCreateTestGTC(ext_bvec1)
glmCreateTestGTC(ext_matrix_relational)
glmCreateTestGTC(ext_scalar_relational)
glmCreateTestGTC(ext_vec1)

105
test/ext/ext_bvec1.cpp Normal file
View File

@ -0,0 +1,105 @@
#include <glm/ext/bvec1.hpp>
#include <glm/ext/bvec1_precision.hpp>
#include <vector>
template <typename genType>
static int test_operators()
{
int Error = 0;
genType const A(true);
genType const B(true);
{
bool const R = A != B;
bool const S = A == B;
Error += (S && !R) ? 0 : 1;
}
return Error;
}
template <typename genType>
static int test_ctor()
{
int Error = 0;
glm::bvec1 const A = genType(true);
glm::bvec1 const E(genType(true));
Error += A == E ? 0 : 1;
glm::bvec1 const F(E);
Error += A == F ? 0 : 1;
return Error;
}
template <typename genType>
static int test_size()
{
int Error = 0;
Error += sizeof(glm::bvec1) == sizeof(genType) ? 0 : 1;
Error += genType().length() == 1 ? 0 : 1;
Error += genType::length() == 1 ? 0 : 1;
return Error;
}
template <typename genType>
static int test_relational()
{
int Error = 0;
genType const A(true);
genType const B(true);
genType const C(false);
Error += A == B ? 0 : 1;
Error += (A && B) == A ? 0 : 1;
Error += (A || C) == A ? 0 : 1;
return Error;
}
template <typename genType>
static int test_constexpr()
{
# if GLM_HAS_CONSTEXPR
static_assert(genType::length() == 1, "GLM: Failed constexpr");
# endif
return 0;
}
int main()
{
int Error = 0;
Error += test_operators<glm::bvec1>();
Error += test_operators<glm::lowp_bvec1>();
Error += test_operators<glm::mediump_bvec1>();
Error += test_operators<glm::highp_bvec1>();
Error += test_ctor<glm::bvec1>();
Error += test_ctor<glm::lowp_bvec1>();
Error += test_ctor<glm::mediump_bvec1>();
Error += test_ctor<glm::highp_bvec1>();
Error += test_size<glm::bvec1>();
Error += test_size<glm::lowp_bvec1>();
Error += test_size<glm::mediump_bvec1>();
Error += test_size<glm::highp_bvec1>();
Error += test_relational<glm::bvec1>();
Error += test_relational<glm::lowp_bvec1>();
Error += test_relational<glm::mediump_bvec1>();
Error += test_relational<glm::highp_bvec1>();
Error += test_constexpr<glm::bvec1>();
Error += test_constexpr<glm::lowp_bvec1>();
Error += test_constexpr<glm::mediump_bvec1>();
Error += test_constexpr<glm::highp_bvec1>();
return Error;
}

View File

@ -1,5 +1,6 @@
#include <glm/ext/matrix_relational.hpp>
#include <glm/mat4x3.hpp>
#include <glm/fvec4.hpp>
int test_equal()
{

View File

@ -1,4 +1,5 @@
#include <glm/gtx/functions.hpp>
#include <glm/fvec2.hpp>
#include <vector>
int test_gauss_1d()