LeviLamina
Loading...
Searching...
No Matches
RenderMaterialBase.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/sem_ver/SemVersion.h"
8#include "mc/deps/core_graphics/VariationMap.h"
9#include "mc/deps/core_graphics/enums/RenderState.h"
10#include "mc/deps/core_graphics/enums/ShaderType.h"
11#include "mc/deps/core_graphics/helpers/InheritanceType.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace Json { class Value; }
16namespace cg { struct RenderFeaturesConfiguration; }
17// clang-format on
18
19namespace cg {
20
22public:
23 // RenderMaterialBase inner types define
24 using DefineSet = ::std::set<::std::string>;
25
26 using MaterialVariationMap = ::std::map<::std::string, ::std::shared_ptr<::cg::RenderMaterialBase>>;
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::shared_ptr<::cg::RenderMaterialBase>>>
32 mMaterialVariations;
33 ::ll::TypedStorage<8, 32, ::cg::VariationMap> mVariationMap;
34 ::ll::TypedStorage<8, 32, ::std::string> mFullMaterialName;
35 ::ll::TypedStorage<8, 32, ::std::string> mVariantName;
36 ::ll::TypedStorage<8, 32, ::std::string> mMaterialIdentifier;
37 ::ll::TypedStorage<8, 16, ::std::set<::std::string>> mDefines;
38 ::ll::TypedStorage<2, 2, ::mce::RenderState> mStateMask;
39 ::ll::TypedStorage<8, 32, ::std::string> mShaderHeader;
40 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mVertexShader;
41 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mFragmentShader;
42 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mGeometryShader;
43 ::ll::TypedStorage<8, 24, ::SemVersion> mVersion;
44 ::ll::TypedStorage<1, 1, uchar> mRequiredTextures;
45 // NOLINTEND
46
47#ifdef LL_PLAT_S
48#else // LL_PLAT_C
49public:
50 // prevent constructor by default
51 RenderMaterialBase& operator=(RenderMaterialBase const&);
52
53#endif
54public:
55 // virtual functions
56 // NOLINTBEGIN
57#ifdef LL_PLAT_S
58 virtual ~RenderMaterialBase() = default;
59#else // LL_PLAT_C
60 virtual ~RenderMaterialBase();
61#endif
62
63 virtual void parseRuntimeStates(::Json::Value const& root) = 0;
64
65 virtual void appendShaderPathForGfxAPI() = 0;
66
67#ifdef LL_PLAT_S
68 virtual ::std::string buildHeader(::std::set<::std::string> const&);
69#else // LL_PLAT_C
70 virtual ::std::string buildHeader(::std::set<::std::string> const& defines);
71#endif
72
73#ifdef LL_PLAT_S
74 virtual void parseShader(::Json::Value const&);
75#else // LL_PLAT_C
76 virtual void parseShader(::Json::Value const& root);
77#endif
78
79 // NOLINTEND
80
81public:
82 // member functions
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCAPI RenderMaterialBase();
86
88
89 MCAPI void addDefine(::std::string const& define);
90
91 MCFOLD ::std::set<::std::string> const& getDefines() const;
92
93 MCFOLD ::std::string const& getMaterialIdentifier() const;
94
95 MCFOLD ::std::map<::std::string, ::std::shared_ptr<::cg::RenderMaterialBase>> const&
96 getMaterialVariationMap() const;
97
98 MCAPI ::Core::PathBuffer<::std::string> const& getShaderProgramName(::mce::ShaderType shaderType) const;
99
100 MCAPI bool hasDefine(::std::string const& define) const;
101
102 MCAPI bool hasState(::mce::RenderState state) const;
103
104 MCAPI void modifyDefines(::cg::RenderFeaturesConfiguration const& features);
105
106 MCAPI void parseDefines(::Json::Value const& root);
107
108 MCAPI void parseMaterial(::Json::Value const& root);
109
110 MCAPI void parseStates(::Json::Value const& root);
111
112 MCAPI bool parseVariantWithInheritance(
113 ::Json::Value const& root,
114 ::std::string_view key,
115 ::mce::InheritanceType inheritanceType
116 );
117
118 MCAPI void parseVersion(::Json::Value const& root);
119
120 MCAPI void removeDefine(::std::string const& define);
121#endif
122 // NOLINTEND
123
124public:
125 // static functions
126 // NOLINTBEGIN
127#ifdef LL_PLAT_C
128 MCAPI static void warnOnDeprecatedSchemaKeyword(::Json::Value const& root, ::std::string_view key);
129#endif
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135#ifdef LL_PLAT_C
136 MCAPI void* $ctor();
137
138 MCAPI void* $ctor(::cg::RenderMaterialBase const&);
139#endif
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145 MCAPI void $dtor();
146 // NOLINTEND
147
148public:
149 // virtual function thunks
150 // NOLINTBEGIN
151#ifdef LL_PLAT_C
152 MCAPI ::std::string $buildHeader(::std::set<::std::string> const& defines);
153
154 MCAPI void $parseShader(::Json::Value const& root);
155#endif
156
157
158 // NOLINTEND
159
160public:
161 // vftables
162 // NOLINTBEGIN
163 MCNAPI static void** $vftable();
164 // NOLINTEND
165};
166
167} // namespace cg
Definition Value.h:16
Definition RenderMaterialBase.h:21
static MCAPI void ** $vftable()
Definition RenderFeaturesConfiguration.h:7