5 KB、83行 生 Blame 履歴
1/// @ref core
2/// @file glm/ext/matrix_float2x2_precision.hpp
3
4#pragma once
5#include "../detail/type_mat2x2.hpp"
6
7namespace glm
8{
9 /// @addtogroup core_matrix_precision
10 /// @{
11
12 /// 2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
13 ///
14 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
15 /// @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>
16 typedef mat<2, 2, float, lowp> lowp_mat2;
17
18 /// 2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
19 ///
20 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
21 /// @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>
22 typedef mat<2, 2, float, mediump> mediump_mat2;
23
24 /// 2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
25 ///
26 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
27 /// @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>
28 typedef mat<2, 2, float, highp> highp_mat2;
29
30 /// 2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
31 ///
32 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
33 /// @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>
34 typedef mat<2, 2, float, lowp> lowp_mat2x2;
35
36 /// 2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
37 ///
38 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
39 /// @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>
40 typedef mat<2, 2, float, mediump> mediump_mat2x2;
41
42 /// 2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
43 ///
44 /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
45 /// @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>
46 typedef mat<2, 2, float, highp> highp_mat2x2;
47
48 /// @}
49}//namespace glm
50
51#if GLM_CONFIG_CTOR_INIT == GLM_DISABLE
52static_assert(std::is_trivially_default_constructible<glm::lowp_mat2x2>::value);
53static_assert(std::is_trivially_default_constructible<glm::mediump_mat2x2>::value);
54static_assert(std::is_trivially_default_constructible<glm::highp_mat2x2>::value);
55static_assert(std::is_trivially_default_constructible<glm::lowp_mat2>::value);
56static_assert(std::is_trivially_default_constructible<glm::mediump_mat2>::value);
57static_assert(std::is_trivially_default_constructible<glm::highp_mat2>::value);
58#endif
59static_assert(std::is_trivially_copy_assignable<glm::lowp_mat2x2>::value);
60static_assert(std::is_trivially_copy_assignable<glm::mediump_mat2x2>::value);
61static_assert(std::is_trivially_copy_assignable<glm::highp_mat2x2>::value);
62static_assert(std::is_trivially_copy_assignable<glm::lowp_mat2>::value);
63static_assert(std::is_trivially_copy_assignable<glm::mediump_mat2>::value);
64static_assert(std::is_trivially_copy_assignable<glm::highp_mat2>::value);
65static_assert(std::is_trivially_copyable<glm::lowp_mat2x2>::value);
66static_assert(std::is_trivially_copyable<glm::mediump_mat2x2>::value);
67static_assert(std::is_trivially_copyable<glm::highp_mat2x2>::value);
68static_assert(std::is_trivially_copyable<glm::lowp_mat2>::value);
69static_assert(std::is_trivially_copyable<glm::mediump_mat2>::value);
70static_assert(std::is_trivially_copyable<glm::highp_mat2>::value);
71static_assert(std::is_copy_constructible<glm::lowp_mat2x2>::value);
72static_assert(std::is_copy_constructible<glm::mediump_mat2x2>::value);
73static_assert(std::is_copy_constructible<glm::highp_mat2x2>::value);
74static_assert(std::is_copy_constructible<glm::lowp_mat2>::value);
75static_assert(std::is_copy_constructible<glm::mediump_mat2>::value);
76static_assert(std::is_copy_constructible<glm::highp_mat2>::value);
77static_assert(glm::lowp_mat2x2::length() == 2);
78static_assert(glm::mediump_mat2x2::length() == 2);
79static_assert(glm::highp_mat2x2::length() == 2);
80static_assert(glm::lowp_mat2::length() == 2);
81static_assert(glm::mediump_mat2::length() == 2);
82static_assert(glm::highp_mat2::length() == 2);
83