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/helpers/InheritanceType.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace Json { class Value; }
15namespace cg { struct RenderFeaturesConfiguration; }
16// clang-format on
17
18namespace cg {
19
21public:
22 // RenderMaterialBase inner types define
23 using DefineSet = ::std::set<::std::string>;
24
25 using MaterialVariationMap = ::std::map<::std::string, ::std::shared_ptr<::cg::RenderMaterialBase>>;
26
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::shared_ptr<::cg::RenderMaterialBase>>>
31 mMaterialVariations;
32 ::ll::TypedStorage<8, 32, ::cg::VariationMap> mVariationMap;
33 ::ll::TypedStorage<8, 32, ::std::string> mFullMaterialName;
34 ::ll::TypedStorage<8, 32, ::std::string> mVariantName;
35 ::ll::TypedStorage<8, 32, ::std::string> mMaterialIdentifier;
36 ::ll::TypedStorage<8, 16, ::std::set<::std::string>> mDefines;
37 ::ll::TypedStorage<2, 2, ::mce::RenderState> mStateMask;
38 ::ll::TypedStorage<8, 32, ::std::string> mShaderHeader;
39 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mVertexShader;
40 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mFragmentShader;
41 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mGeometryShader;
42 ::ll::TypedStorage<8, 24, ::SemVersion> mVersion;
43 ::ll::TypedStorage<1, 1, uchar> mRequiredTextures;
44 // NOLINTEND
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49#ifdef LL_PLAT_S
50 virtual ~RenderMaterialBase() = default;
51#else // LL_PLAT_C
52 virtual ~RenderMaterialBase();
53#endif
54
55 virtual void parseRuntimeStates(::Json::Value const&) = 0;
56
57 virtual void appendShaderPathForGfxAPI() = 0;
58
59 virtual ::std::string buildHeader(::std::set<::std::string> const& defines);
60
61 virtual void parseShader(::Json::Value const& root);
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI_C void addDefine(::std::string const& define);
68
69 MCAPI_C void modifyDefines(::cg::RenderFeaturesConfiguration const& features);
70
71 MCAPI_C void parseDefines(::Json::Value const& root);
72
73 MCAPI_C void parseMaterial(::Json::Value const& root);
74
75 MCAPI_C void parseStates(::Json::Value const& root);
76
77 MCAPI_C bool parseVariantWithInheritance(
78 ::Json::Value const& root,
79 ::std::string_view key,
80 ::mce::InheritanceType inheritanceType
81 );
82
83 MCAPI_C void parseVersion(::Json::Value const& root);
84 // NOLINTEND
85
86public:
87 // static functions
88 // NOLINTBEGIN
89 MCAPI_C static void warnOnDeprecatedSchemaKeyword(::Json::Value const& root, ::std::string_view key);
90 // NOLINTEND
91
92public:
93 // constructor thunks
94 // NOLINTBEGIN
95 MCAPI_C void* $ctor();
96
97 MCAPI_C void* $ctor(::cg::RenderMaterialBase const&);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109#ifdef LL_PLAT_C
110 MCAPI ::std::string $buildHeader(::std::set<::std::string> const& defines);
111
112 MCFOLD void $parseShader(::Json::Value const& root);
113#endif
114
115
116 // NOLINTEND
117
118public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123};
124
125} // namespace cg
Definition Value.h:16
Definition RenderMaterialBase.h:20
static MCAPI void ** $vftable()
Definition RenderFeaturesConfiguration.h:7