GLSL Struct 1.4.0
glslstruct
Loading...
Searching...
No Matches
types.hpp
1/*
2 * glslstruct - a C++ library designed to easily represent GLSL's Uniform Buffer Objects (UBOs) and Shader Storage Buffer Objects (SSBOs) in C++.
3 *
4 * Licensed under the BSD 3-Clause License with Attribution Requirement.
5 * See the LICENSE file for details: https://github.com/MAIPA01/glslstruct/blob/main/LICENSE
6 *
7 * Copyright (c) 2025, Patryk Antosik (MAIPA01)
8 */
9
10#pragma once
11#ifndef _GLSL_STRUCT_TYPES_HPP_
12 #define _GLSL_STRUCT_TYPES_HPP_
13
14 #include <glslstruct/config.hpp>
15
17_GLSL_STRUCT_ERROR("This is only available for c++17 and greater!");
18 #else
19
20 #include <glslstruct/type/checks/struct_checks.hpp>
22 #include <glslstruct/type/checks/type_checks.hpp>
23 #endif
24
25namespace glslstruct {
27 template<utils::glsl_simple_or_layout T, size_t Num = 0>
28 #else
29 template<class T, size_t Num = 0, std::enable_if_t<utils::is_glsl_simple_or_layout_v<T>, bool> = true>
30 #endif
31 struct glsl_variable;
32
34 template<utils::glsl_simple_or_struct T, size_t Num = 0>
35 #else
36 template<class T, size_t Num = 0, std::enable_if_t<utils::is_glsl_simple_or_struct_v<T>, bool> = true>
37 #endif
38 struct glsl_value;
39} // namespace glslstruct
40
41 #ifndef GLSL_STRUCT_DISABLE_GLM
42 #pragma region SOME_ADDITIONAL_GLM_TYPES
43
44namespace glm {
45 using bmat2x2 = mat<2, 2, bool, packed_highp>;
46 using bmat2x3 = mat<2, 3, bool, packed_highp>;
47 using bmat2x4 = mat<2, 4, bool, packed_highp>;
48 using bmat3x2 = mat<3, 2, bool, packed_highp>;
49 using bmat3x3 = mat<3, 3, bool, packed_highp>;
50 using bmat3x4 = mat<3, 4, bool, packed_highp>;
51 using bmat4x2 = mat<4, 2, bool, packed_highp>;
52 using bmat4x3 = mat<4, 3, bool, packed_highp>;
53 using bmat4x4 = mat<4, 4, bool, packed_highp>;
54
55 using bmat2 = bmat2x2;
56 using bmat3 = bmat3x3;
57 using bmat4 = bmat4x4;
58
59 using umat2 = umat2x2;
60 using umat3 = umat3x3;
61 using umat4 = umat4x4;
62
63 using imat2 = imat2x2;
64 using imat3 = imat3x3;
65 using imat4 = imat4x4;
66} // namespace glm
67
68 #pragma endregion
69 #endif
70
71 #endif
72#endif
#define _GLSL_STRUCT_HAS_CXX20
check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using ...
Definition config.hpp:142
#define _GLSL_STRUCT_HAS_CXX17
check if compiler has c++ version greater or equal to c++17
Definition config.hpp:130
#define _GLSL_STRUCT_HAS_TYPES
check if user not disabled type containers using GLSL_STRUCT_DISABLE_TYPES
Definition config.hpp:162