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
66 using PauseStateChangeConnector = ::Bedrock::PubSub::Connector<void(bool)>;
67
68 using FrameObjectPtr = ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>;
69
70public:
71 // member variables
72 // NOLINTBEGIN
73 ::ll::TypedStorage<8, 72, ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>>
74 mFrameObject_NoAccessOutsideRender;
75 ::ll::TypedStorage<8, 16, ::LinearAllocator<::FrameRenderObject>> mLinearAllocator;
76 ::ll::TypedStorage<8, 208, ::MinecraftGraphicsPipeline> mMinecraftGraphicsPipeline;
77 ::ll::TypedStorage<8, 8, ::MinecraftGraphics&> mMinecraftGraphics;
78 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IClientInstance>> mClient;
79 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mPrimaryClient;
80 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector>> mFrameAnomalyDetector;
81 ::ll::TypedStorage<8, 16, ::GameRenderer::Overlays> mOverlays;
82 ::ll::TypedStorage<8, 88, ::mce::RenderGraph> mRenderGraph;
83 ::ll::TypedStorage<4, 24, ::mce::Clock> mClock;
84 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Tessellator>> mTessellator;
85 ::ll::TypedStorage<8, 8, ::TickingTextureStage*> mTickingTextureStage;
86 ::ll::TypedStorage<4, 4, float> mLastClockTime;
87 ::ll::TypedStorage<1, 1, bool> mFlushedInitCommandList;
88 ::ll::TypedStorage<4, 4, int> _tick;
89 ::ll::TypedStorage<2, 2, short> mPointerX;
90 ::ll::TypedStorage<2, 2, short> mPointerY;
91 ::ll::TypedStorage<1, 1, bool> mUseLowFrequencyUIRender;
92 ::ll::TypedStorage<4, 8, ::std::optional<::GameRenderer::FrameCaptureMode>> mFrameCaptureMode;
93 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InsideCubeRenderer>> mInsideCubeRenderer;
94 ::ll::TypedStorage<8, 8, ::std::chrono::nanoseconds> mLastFrameTime;
95 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::PlayerRenderView>>> mPlayerViews;
96 ::ll::TypedStorage<8, 8, ::optional_ref<::mce::RenderStage>> mDirectOutputStage;
97 ::ll::TypedStorage<8, 8, ::optional_ref<::CommandListQueue>> mCommandListQueue;
98 ::ll::TypedStorage<8, 280, ::std::optional<::ScreenContext>> mCurrentFrameScreenContext;
99 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrix;
100 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrixAbsolute;
101 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelProjMatrix;
102 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelWorldMatrix;
103 ::ll::TypedStorage<4, 64, ::Matrix> mCubemapWorldMatrix;
104 ::ll::TypedStorage<1, 1, bool> mCubemapRotationPaused;
105 ::ll::TypedStorage<8, 8, double> mCubemapRotationSeconds;
106 ::ll::TypedStorage<1, 1, bool> mHasCustomSoftwareCursor;
107 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCustomSoftwareCursorAsset;
108 ::ll::TypedStorage<8, 32, ::std::string> mExperimentsString;
109 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IRenderChunkGarbageCollection>> mGarbageCollection;
110 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPauseSubscription;
111 // NOLINTEND
112
113public:
114 // prevent constructor by default
115 GameRenderer& operator=(GameRenderer const&);
116 GameRenderer(GameRenderer const&);
117 GameRenderer();
118
119public:
120 // virtual functions
121 // NOLINTBEGIN
122 virtual ~GameRenderer() = default;
123 // NOLINTEND
124
125public:
126 // member functions
127 // NOLINTBEGIN
128 MCAPI GameRenderer(
129 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci,
130 ::MinecraftGraphics& graphics,
131 ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector> const& frameAnomalyDetector
132 );
133
134 MCAPI void _checkAndDrawInputUI(::ScreenContext& screenContext);
135
136 MCAPI ::std::weak_ptr<::PlayerRenderView> addPlayerRenderView(::LevelRenderer& renderer);
137
138 MCAPI void createRenderGraph(::mce::RenderContext& renderContext, bool onResume);
139
140 MCAPI ::ScreenContext makeScreenContext(float a);
141
142 MCAPI void onAppSuspended();
143
144 MCAPI void onSubClientRemoved(::IClientInstance const& client);
145
146 MCAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector<void(bool)>& connector);
147
148 MCAPI void removePlayerRenderView(::PlayerRenderView* view);
149
150 MCAPI void renderCurrentFrame(float a);
151
152 MCAPI void renderDebugScreen(::ScreenContext& screenContext, ::IClientInstance& client);
153
154 MCAPI void setLevel(::Level* level, ::Dimension* dimension);
155
156 MCAPI void tick();
157 // NOLINTEND
158
159public:
160 // static functions
161 // NOLINTBEGIN
162 MCAPI static void setClearColor(::IClientInstance& client, ::ScreenContext& screenContext);
163 // NOLINTEND
164
165public:
166 // static variables
167 // NOLINTBEGIN
168 MCAPI static ::mce::Color& mClearColor();
169
170 MCAPI static bool& mSplitScreenActive();
171
172 MCAPI static ::std::string& mVersionString();
173 // NOLINTEND
174
175public:
176 // constructor thunks
177 // NOLINTBEGIN
178 MCAPI void* $ctor(
179 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci,
180 ::MinecraftGraphics& graphics,
181 ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector> const& frameAnomalyDetector
182 );
183 // NOLINTEND
184};
Definition CommandListQueue.h:5
Definition Dimension.h:86
Definition FrameAnomalyDetector.h:13
Definition GameRenderer.h:5
Definition IClientInstance.h:5
Definition IRenderChunkGarbageCollection.h:5
Definition InsideCubeRenderer.h:5
Definition LevelRenderer.h:5
Definition Level.h:253
Definition MinecraftGraphics.h:5
Definition PlayerRenderView.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