LeviLamina
Loading...
Searching...
No Matches
GameRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/ScreenContext.h"
7#include "mc/client/renderer/MinecraftGraphicsPipeline.h"
8#include "mc/client/renderer/RenderGraph.h"
9#include "mc/deps/core/file/PathBuffer.h"
10#include "mc/deps/core/math/Matrix.h"
11#include "mc/deps/core/memory/LinearAllocator.h"
12#include "mc/deps/core/timing/Clock.h"
13#include "mc/deps/core/utility/NonOwnerPointer.h"
14#include "mc/deps/core/utility/optional_ref.h"
15#include "mc/deps/core/utility/pub_sub/Connector.h"
16#include "mc/deps/core/utility/pub_sub/Subscription.h"
17
18// auto generated forward declare list
19// clang-format off
21class Dimension;
23class IClientInstance;
26class Level;
27class LevelRenderer;
30class Tessellator;
33namespace mce { class Color; }
34namespace mce { class RenderContext; }
35namespace mce { class RenderStage; }
36// clang-format on
37
38class GameRenderer {
39public:
40 // GameRenderer inner types declare
41 // clang-format off
42 struct Overlays;
43 // clang-format on
44
45 // GameRenderer inner types define
46 enum class FrameCaptureMode : int {
47 Screenshot = 0,
48 Panorama = 1,
49 };
50
51 struct Overlays {
52 public:
53 // member variables
54 // NOLINTBEGIN
55 ::ll::UntypedStorage<8, 8> mUnk326994;
56 ::ll::UntypedStorage<8, 8> mUnkedc2e7;
57 // NOLINTEND
58
59 public:
60 // prevent constructor by default
61 Overlays& operator=(Overlays const&);
62 Overlays(Overlays const&);
63 Overlays();
64
65 public:
66 // member functions
67 // NOLINTBEGIN
68 MCNAPI ~Overlays();
69 // NOLINTEND
70
71 public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCNAPI void $dtor();
75 // NOLINTEND
76 };
77
78 using PauseStateChangeConnector = ::Bedrock::PubSub::Connector<void(bool)>;
79
80 using FrameObjectPtr = ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>;
81
82public:
83 // member variables
84 // NOLINTBEGIN
85 ::ll::TypedStorage<8, 72, ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>>
86 mFrameObject_NoAccessOutsideRender;
87 ::ll::TypedStorage<8, 16, ::LinearAllocator<::FrameRenderObject>> mLinearAllocator;
88 ::ll::TypedStorage<8, 208, ::MinecraftGraphicsPipeline> mMinecraftGraphicsPipeline;
89 ::ll::TypedStorage<8, 8, ::MinecraftGraphics&> mMinecraftGraphics;
90 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IClientInstance>> mClient;
91 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mPrimaryClient;
92 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector>> mFrameAnomalyDetector;
93 ::ll::TypedStorage<8, 16, ::GameRenderer::Overlays> mOverlays;
94 ::ll::TypedStorage<8, 88, ::mce::RenderGraph> mRenderGraph;
95 ::ll::TypedStorage<4, 24, ::mce::Clock> mClock;
96 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Tessellator>> mTessellator;
97 ::ll::TypedStorage<8, 8, ::TickingTextureStage*> mTickingTextureStage;
98 ::ll::TypedStorage<4, 4, float> mLastClockTime;
99 ::ll::TypedStorage<1, 1, bool> mFlushedInitCommandList;
100 ::ll::TypedStorage<4, 4, int> _tick;
101 ::ll::TypedStorage<2, 2, short> mPointerX;
102 ::ll::TypedStorage<2, 2, short> mPointerY;
103 ::ll::TypedStorage<1, 1, bool> mUseLowFrequencyUIRender;
104 ::ll::TypedStorage<4, 8, ::std::optional<::GameRenderer::FrameCaptureMode>> mFrameCaptureMode;
105 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InsideCubeRenderer>> mInsideCubeRenderer;
106 ::ll::TypedStorage<8, 8, ::std::chrono::nanoseconds> mLastFrameTime;
107 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::PlayerRenderView>>> mPlayerViews;
108 ::ll::TypedStorage<8, 8, ::optional_ref<::mce::RenderStage>> mDirectOutputStage;
109 ::ll::TypedStorage<8, 8, ::optional_ref<::CommandListQueue>> mCommandListQueue;
110 ::ll::TypedStorage<8, 280, ::std::optional<::ScreenContext>> mCurrentFrameScreenContext;
111 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrix;
112 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrixAbsolute;
113 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelProjMatrix;
114 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelWorldMatrix;
115 ::ll::TypedStorage<4, 64, ::Matrix> mCubemapWorldMatrix;
116 ::ll::TypedStorage<1, 1, bool> mCubemapRotationPaused;
117 ::ll::TypedStorage<8, 8, double> mCubemapRotationSeconds;
118 ::ll::TypedStorage<1, 1, bool> mHasCustomSoftwareCursor;
119 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCustomSoftwareCursorAsset;
120 ::ll::TypedStorage<8, 32, ::std::string> mExperimentsString;
121 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IRenderChunkGarbageCollection>> mGarbageCollection;
122 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPauseSubscription;
123 // NOLINTEND
124
125public:
126 // prevent constructor by default
127 GameRenderer& operator=(GameRenderer const&);
128 GameRenderer(GameRenderer const&);
129 GameRenderer();
130
131public:
132 // virtual functions
133 // NOLINTBEGIN
134 virtual ~GameRenderer();
135 // NOLINTEND
136
137public:
138 // member functions
139 // NOLINTBEGIN
140 MCAPI GameRenderer(
141 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci,
142 ::MinecraftGraphics& graphics,
143 ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector> const& frameAnomalyDetector
144 );
145
146 MCAPI void _checkAndDrawInputUI(::ScreenContext& screenContext);
147
148 MCAPI ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>
149 _extractFrame(::ScreenContext& screenContext, bool renderGraphContainsPlayScreen);
150
151 MCAPI void _prepareFrame(::ScreenContext& screenContext);
152
153 MCAPI ::std::weak_ptr<::PlayerRenderView> addPlayerRenderView(::LevelRenderer& renderer);
154
155 MCAPI void createRenderGraph(::mce::RenderContext& renderContext, bool onResume);
156
157 MCAPI void endFrame(::mce::RenderContext& renderContext);
158
159 MCFOLD ::Matrix const& getCubemapWorldMat() const;
160
161 MCFOLD ::Matrix const& getLastLevelProjSpace() const;
162
163 MCFOLD ::Matrix const& getLastLevelViewSpace() const;
164
165 MCFOLD ::Tessellator& getTessellator();
166
167 MCAPI ::ScreenContext makeScreenContext(float a);
168
169 MCFOLD void onAppResumed();
170
171 MCAPI void onAppSuspended();
172
173 MCAPI void onSubClientRemoved(::IClientInstance const& client);
174
175 MCAPI void recreateTickingTextureStage();
176
177 MCAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector<void(bool)>& connector);
178
179 MCAPI void renderCurrentFrame(float a);
180
181 MCAPI void renderCursor(::ScreenContext& screenContext, float xMouse, float yMouse);
182
183 MCAPI void renderDebugScreen(::ScreenContext& screenContext, ::IClientInstance& client);
184
185 MCAPI void setCapturingFrame(::std::optional<::GameRenderer::FrameCaptureMode> frameCaptureMode);
186
187 MCAPI void setClient(::IClientInstance& ci);
188
189 MCAPI void setCommandListQueue(::CommandListQueue& commandListQueue);
190
191 MCAPI void setCubemapRotationPaused(bool paused);
192
193 MCAPI void setLastLevelProjSpace(::Matrix const& projMat);
194
195 MCAPI void setLastLevelViewSpace(::Matrix const& viewMat);
196
197 MCAPI void setLastLevelViewSpaceAbsolute(::Matrix const& viewMat);
198
199 MCAPI void setLastLevelWorldSpace(::Matrix const& worldMat);
200
201 MCAPI void setLevel(::Level* level, ::Dimension* dimension);
202
203 MCAPI void setLowFrequencyUIRender(bool val);
204
205 MCFOLD void startFrame(::mce::RenderContext& renderContext);
206
207 MCAPI void tick();
208
209 MCAPI bool useLowFrequencyUIRender() const;
210 // NOLINTEND
211
212public:
213 // static functions
214 // NOLINTBEGIN
215 MCAPI static void clearRenderTarget(::ScreenContext& screenContext);
216
217 MCAPI static void setClearColor(::IClientInstance& client, ::ScreenContext& screenContext);
218 // NOLINTEND
219
220public:
221 // static variables
222 // NOLINTBEGIN
223 MCAPI static ::mce::Color& mClearColor();
224
225 MCAPI static bool& mSplitScreenActive();
226
227 MCAPI static ::std::string& mVersionString();
228 // NOLINTEND
229
230public:
231 // constructor thunks
232 // NOLINTBEGIN
233 MCAPI void* $ctor(
234 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci,
235 ::MinecraftGraphics& graphics,
236 ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector> const& frameAnomalyDetector
237 );
238 // NOLINTEND
239
240public:
241 // destructor thunk
242 // NOLINTBEGIN
243 MCAPI void $dtor();
244 // NOLINTEND
245
246public:
247 // vftables
248 // NOLINTBEGIN
249 MCNAPI static void** $vftable();
250 // NOLINTEND
251};
Definition Connector.h:8
Definition CommandListQueue.h:5
Definition Dimension.h:88
Definition FrameAnomalyDetector.h:14
Definition GameRenderer.h:5
static MCAPI void ** $vftable()
Definition IClientInstance.h:5
Definition IRenderChunkGarbageCollection.h:5
Definition InsideCubeRenderer.h:5
Definition LevelRenderer.h:5
Definition Level.h:254
Definition Matrix.h:10
Definition MinecraftGraphics.h:5
Definition PlayerRenderView.h:5
Definition ScreenContext.h:5
Definition Tessellator.h:5
Definition TickingTextureStage.h:5
Definition Color.h:13
Definition RenderContext.h:7
Definition RenderStage.h:7
Definition FrameRenderObject.h:5
Definition GameRenderer.h:15