15 | {
16 | GLM_STATIC_ASSERT(detail::is_aligned::value, "Specialization requires aligned");
17 |
18 | GLM_FUNC_QUALIFIER static tmat4x4 call(tmat4x4 const & x, tmat4x4 const & y)
19 | {
20 | tmat4x4 result(uninitialize);
21 | glm_mat4_matrixCompMult(
22 | *(glm_vec4 const (*)[4])&x[0].data,
23 | *(glm_vec4 const (*)[4])&y[0].data,
24 | *(glm_vec4(*)[4])&result[0].data);
25 | return result;
26 | }
27 | };
28 |
29 | template
30 | struct compute_transpose
31 | {
32 | GLM_FUNC_QUALIFIER static tmat4x4 call(tmat4x4 const & m)
33 | {
34 | tmat4x4 result(uninitialize);
35 | glm_mat4_transpose(
36 | *(glm_vec4 const (*)[4])&m[0].data,
37 | *(glm_vec4(*)[4])&result[0].data);
38 | return result;
39 | }
40 | };
41 |
42 | template
43 | struct compute_determinant
44 | {
45 | GLM_FUNC_QUALIFIER static float call(tmat4x4 const& m)
46 | {
47 | return _mm_cvtss_f32(glm_mat4_determinant(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data)));
48 | }
49 | };
50 |
51 | template
52 | struct compute_inverse
53 | {
54 | GLM_FUNC_QUALIFIER static tmat4x4 call(tmat4x4 const& m)
55 | {
56 | tmat4x4 Result(uninitialize);
57 | glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
58 | return Result;
59 | }
60 | };
61 | }//namespace detail
62 |
63 | template<>
64 | GLM_FUNC_QUALIFIER tmat4x4 outerProduct(tvec4 const & c, tvec4 const & r)
65 | {
66 | tmat4x4 m(uninitialize);
67 | glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
68 | return m;
69 | }
70 |
71 | template<>
72 | GLM_FUNC_QUALIFIER tmat4x4 outerProduct(tvec4 const & c, tvec4 const & r)
73 | {
74 | tmat4x4 m(uninitialize);
75 | glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
76 | return m;
77 | }
78 |
79 | template<>
80 | GLM_FUNC_QUALIFIER tmat4x4 outerProduct(tvec4 const & c, tvec4 const & r)
81 | {
82 | tmat4x4 m(uninitialize);
83 | glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
84 | return m;
85 | }
86 | }//namespace glm
87 |
88 | #endif
89 |
--------------------------------------------------------------------------------
/deps/glm/detail/func_packing_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_packing_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/deps/glm/detail/func_trigonometric_simd.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/khalladay/VkBreakout/a992a8dec1ed8da3105bd817403da251b106080b/deps/glm/detail/func_trigonometric_simd.inl
--------------------------------------------------------------------------------
/deps/glm/detail/func_vector_relational_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_vector_relational_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/deps/glm/detail/precision.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/precision.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm
9 | {
10 | enum precision
11 | {
12 | packed_highp,
13 | packed_mediump,
14 | packed_lowp,
15 |
16 | # if GLM_HAS_ALIGNED_TYPE
17 | aligned_highp,
18 | aligned_mediump,
19 | aligned_lowp,
20 | aligned = aligned_highp,
21 | # endif
22 |
23 | highp = packed_highp,
24 | mediump = packed_mediump,
25 | lowp = packed_lowp,
26 | packed = packed_highp,
27 |
28 | # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED)
29 | defaultp = aligned_highp
30 | # else
31 | defaultp = highp
32 | # endif
33 | };
34 |
35 | namespace detail
36 | {
37 | template
38 | struct is_aligned
39 | {
40 | static const bool value = false;
41 | };
42 |
43 | # if GLM_HAS_ALIGNED_TYPE
44 | template<>
45 | struct is_aligned
46 | {
47 | static const bool value = true;
48 | };
49 |
50 | template<>
51 | struct is_aligned
52 | {
53 | static const bool value = true;
54 | };
55 |
56 | template<>
57 | struct is_aligned
58 | {
59 | static const bool value = true;
60 | };
61 | # endif
62 | }//namespace detail
63 | }//namespace glm
64 |
--------------------------------------------------------------------------------
/deps/glm/detail/type_float.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_float.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | typedef float float32;
12 | typedef double float64;
13 | }//namespace detail
14 |
15 | typedef float lowp_float_t;
16 | typedef float mediump_float_t;
17 | typedef double highp_float_t;
18 |
19 | /// @addtogroup core_precision
20 | /// @{
21 |
22 | /// Low precision floating-point numbers.
23 | /// There is no guarantee on the actual precision.
24 | ///
25 | /// @see GLSL 4.20.8 specification, section 4.1.4 Floats
26 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
27 | typedef lowp_float_t lowp_float;
28 |
29 | /// Medium precision floating-point numbers.
30 | /// There is no guarantee on the actual precision.
31 | ///
32 | /// @see GLSL 4.20.8 specification, section 4.1.4 Floats
33 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
34 | typedef mediump_float_t mediump_float;
35 |
36 | /// High precision floating-point numbers.
37 | /// There is no guarantee on the actual precision.
38 | ///
39 | /// @see GLSL 4.20.8 specification, section 4.1.4 Floats
40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
41 | typedef highp_float_t highp_float;
42 |
43 | #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
44 | typedef mediump_float float_t;
45 | #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
46 | typedef highp_float float_t;
47 | #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
48 | typedef mediump_float float_t;
49 | #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
50 | typedef lowp_float float_t;
51 | #else
52 | # error "GLM error: multiple default precision requested for floating-point types"
53 | #endif
54 |
55 | typedef float float32;
56 | typedef double float64;
57 |
58 | ////////////////////
59 | // check type sizes
60 | #ifndef GLM_STATIC_ASSERT_NULL
61 | GLM_STATIC_ASSERT(sizeof(glm::float32) == 4, "float32 size isn't 4 bytes on this platform");
62 | GLM_STATIC_ASSERT(sizeof(glm::float64) == 8, "float64 size isn't 8 bytes on this platform");
63 | #endif//GLM_STATIC_ASSERT_NULL
64 |
65 | /// @}
66 |
67 | }//namespace glm
68 |
--------------------------------------------------------------------------------
/deps/glm/detail/type_half.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_half.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | typedef short hdata;
12 |
13 | GLM_FUNC_DECL float toFloat32(hdata value);
14 | GLM_FUNC_DECL hdata toFloat16(float const & value);
15 |
16 | }//namespace detail
17 | }//namespace glm
18 |
19 | #include "type_half.inl"
20 |
--------------------------------------------------------------------------------
/deps/glm/detail/type_mat.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat.inl
3 |
4 |
--------------------------------------------------------------------------------
/deps/glm/detail/type_mat4x4_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat4x4_sse2.inl
3 |
4 | namespace glm
5 | {
6 |
7 | }//namespace glm
8 |
--------------------------------------------------------------------------------
/deps/glm/detail/type_vec.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_vec.inl
3 |
--------------------------------------------------------------------------------
/deps/glm/exponential.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/exponential.hpp
3 |
4 | #pragma once
5 |
6 | #include "detail/func_exponential.hpp"
7 |
--------------------------------------------------------------------------------
/deps/glm/geometric.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/geometric.hpp
3 |
4 | #pragma once
5 |
6 | #include "detail/func_geometric.hpp"
7 |
--------------------------------------------------------------------------------
/deps/glm/glm.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/glm.hpp
3 | ///
4 | /// @defgroup core GLM Core
5 | ///
6 | /// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible.
7 | ///
8 | /// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and
9 | /// C++ functions that mirror the GLSL functions. It also includes
10 | /// @ref core_precision "a set of precision-based types" that can be used in the appropriate
11 | /// functions. The C++ types are all based on a basic set of @ref core_template "template types".
12 | ///
13 | /// The best documentation for GLM Core is the current GLSL specification,
14 | /// version 4.2
15 | /// (pdf file).
16 | ///
17 | /// GLM core functionnalities require to be included to be used.
18 | ///
19 | /// @defgroup core_types Types
20 | ///
21 | /// @brief The standard types defined by the specification.
22 | ///
23 | /// These types are all typedefs of more generalized, template types. To see the definition
24 | /// of these template types, go to @ref core_template.
25 | ///
26 | /// @ingroup core
27 | ///
28 | /// @defgroup core_precision Precision types
29 | ///
30 | /// @brief Non-GLSL types that are used to define precision-based types.
31 | ///
32 | /// The GLSL language allows the user to define the precision of a particular variable.
33 | /// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility
34 | /// with OpenGL ES's precision qualifiers, where they @em do have an effect.
35 | ///
36 | /// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing:
37 | /// a number of typedefs of the @ref core_template that use a particular precision.
38 | ///
39 | /// None of these types make any guarantees about the actual precision used.
40 | ///
41 | /// @ingroup core
42 | ///
43 | /// @defgroup core_template Template types
44 | ///
45 | /// @brief The generic template types used as the basis for the core types.
46 | ///
47 | /// These types are all templates used to define the actual @ref core_types.
48 | /// These templetes are implementation details of GLM types and should not be used explicitly.
49 | ///
50 | /// @ingroup core
51 |
52 | #include "detail/_fixes.hpp"
53 |
54 | #pragma once
55 |
56 | #include
57 | #include
58 | #include
59 | #include
60 | #include
61 | #include "fwd.hpp"
62 |
63 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)
64 | # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
65 | # pragma message("GLM: Core library included")
66 | #endif//GLM_MESSAGES
67 |
68 | #include "vec2.hpp"
69 | #include "vec3.hpp"
70 | #include "vec4.hpp"
71 | #include "mat2x2.hpp"
72 | #include "mat2x3.hpp"
73 | #include "mat2x4.hpp"
74 | #include "mat3x2.hpp"
75 | #include "mat3x3.hpp"
76 | #include "mat3x4.hpp"
77 | #include "mat4x2.hpp"
78 | #include "mat4x3.hpp"
79 | #include "mat4x4.hpp"
80 |
81 | #include "trigonometric.hpp"
82 | #include "exponential.hpp"
83 | #include "common.hpp"
84 | #include "packing.hpp"
85 | #include "geometric.hpp"
86 | #include "matrix.hpp"
87 | #include "vector_relational.hpp"
88 | #include "integer.hpp"
89 |
--------------------------------------------------------------------------------
/deps/glm/gtc/color_encoding.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_color_encoding
2 | /// @file glm/gtc/color_encoding.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER tvec3 convertLinearSRGBToD65XYZ(tvec3 const& ColorLinearSRGB)
8 | {
9 | tvec3 const M(0.490f, 0.17697f, 0.2f);
10 | tvec3 const N(0.31f, 0.8124f, 0.01063f);
11 | tvec3 const O(0.490f, 0.01f, 0.99f);
12 |
13 | return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast(5.650675255693055f);
14 | }
15 |
16 | template
17 | GLM_FUNC_QUALIFIER tvec3 convertD65XYZToLinearSRGB(tvec3 const& ColorD65XYZ)
18 | {
19 | tvec3 const M(0.41847f, -0.091169f, 0.0009209f);
20 | tvec3 const N(-0.15866f, 0.25243f, 0.015708f);
21 | tvec3 const O(0.0009209f, -0.0025498f, 0.1786f);
22 |
23 | return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
24 | }
25 |
26 | template
27 | GLM_FUNC_QUALIFIER tvec3 convertLinearSRGBToD50XYZ(tvec3 const& ColorLinearSRGB)
28 | {
29 | tvec3 const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f);
30 | tvec3 const N(0.385101860087134f, 0.716942745571917f, 0.097076381494207f);
31 | tvec3 const O(0.143067806654203f, 0.060618777416563f, 0.713926257896652f);
32 |
33 | return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB;
34 | }
35 |
36 | template
37 | GLM_FUNC_QUALIFIER tvec3 convertD50XYZToLinearSRGB(tvec3 const& ColorD50XYZ)
38 | {
39 | tvec3 const M();
40 | tvec3 const N();
41 | tvec3 const O();
42 |
43 | return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
44 | }
45 |
46 | template
47 | GLM_FUNC_QUALIFIER tvec3 convertD65XYZToD50XYZ(tvec3 const& ColorD65XYZ)
48 | {
49 | tvec3 const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f);
50 | tvec3 const N(+0.022898981050086f, +0.990508028941971f, +0.015072338237051f);
51 | tvec3 const O(-0.050206647741605f, -0.017074711360960f, +0.751717835079977f);
52 |
53 | return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
54 | }
55 |
56 | template
57 | GLM_FUNC_QUALIFIER tvec3 convertD50XYZToD65XYZ(tvec3 const& ColorD50XYZ)
58 | {
59 | tvec3 const M();
60 | tvec3 const N();
61 | tvec3 const O();
62 |
63 | return M * ColorD50XYZ + N * ColorD50XYZ + O * ColorD50XYZ;
64 | }
65 | }//namespace glm
66 |
--------------------------------------------------------------------------------
/deps/glm/gtc/color_space.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_color_space
2 | /// @file glm/gtc/color_space.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_color_space (dependence)
6 | ///
7 | /// @defgroup gtc_color_space GLM_GTC_color_space
8 | /// @ingroup gtc
9 | ///
10 | /// @brief Allow to perform bit operations on integer values
11 | ///
12 | /// need to be included to use these functionalities.
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/precision.hpp"
19 | #include "../exponential.hpp"
20 | #include "../vec3.hpp"
21 | #include "../vec4.hpp"
22 | #include
23 |
24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 | # pragma message("GLM: GLM_GTC_color_space extension included")
26 | #endif
27 |
28 | namespace glm
29 | {
30 | /// @addtogroup gtc_color_space
31 | /// @{
32 |
33 | /// Convert a linear color to sRGB color using a standard gamma correction.
34 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
35 | template class vecType>
36 | GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear);
37 |
38 | /// Convert a linear color to sRGB color using a custom gamma correction.
39 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
40 | template class vecType>
41 | GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma);
42 |
43 | /// Convert a sRGB color to linear color using a standard gamma correction.
44 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
45 | template class vecType>
46 | GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB);
47 |
48 | /// Convert a sRGB color to linear color using a custom gamma correction.
49 | // IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
50 | template class vecType>
51 | GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma);
52 |
53 | /// @}
54 | } //namespace glm
55 |
56 | #include "color_space.inl"
57 |
--------------------------------------------------------------------------------
/deps/glm/gtc/color_space.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_color_space
2 | /// @file glm/gtc/color_space.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 | template class vecType>
8 | struct compute_rgbToSrgb
9 | {
10 | GLM_FUNC_QUALIFIER static vecType call(vecType const& ColorRGB, T GammaCorrection)
11 | {
12 | vecType const ClampedColor(clamp(ColorRGB, static_cast(0), static_cast(1)));
13 |
14 | return mix(
15 | pow(ClampedColor, vecType(GammaCorrection)) * static_cast(1.055) - static_cast(0.055),
16 | ClampedColor * static_cast(12.92),
17 | lessThan(ClampedColor, vecType(static_cast(0.0031308))));
18 | }
19 | };
20 |
21 | template
22 | struct compute_rgbToSrgb
23 | {
24 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& ColorRGB, T GammaCorrection)
25 | {
26 | return tvec4(compute_rgbToSrgb::call(tvec3(ColorRGB), GammaCorrection), ColorRGB.w);
27 | }
28 | };
29 |
30 | template class vecType>
31 | struct compute_srgbToRgb
32 | {
33 | GLM_FUNC_QUALIFIER static vecType call(vecType const& ColorSRGB, T Gamma)
34 | {
35 | return mix(
36 | pow((ColorSRGB + static_cast(0.055)) * static_cast(0.94786729857819905213270142180095), vecType(Gamma)),
37 | ColorSRGB * static_cast(0.07739938080495356037151702786378),
38 | lessThanEqual(ColorSRGB, vecType(static_cast