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;
22class IClientInstance;
25class Level;
26class LevelRenderer;
29class Tessellator;
32namespace mce { class Color; }
33namespace mce { class RenderContext; }
34namespace mce { class RenderStage; }
35// clang-format on
36
37class GameRenderer {
38public:
39 // GameRenderer inner types declare
40 // clang-format off
41 struct Overlays;
42 // clang-format on
43
44 // GameRenderer inner types define
45 enum class FrameCaptureMode : int {
46 Screenshot = 0,
47 Panorama = 1,
48 };
49
50 struct Overlays {
51 public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::UntypedStorage<8, 8> mUnk326994;
55 // NOLINTEND
56
57 public:
58 // prevent constructor by default
59 Overlays& operator=(Overlays const&);
60 Overlays(Overlays const&);
61 Overlays();
62
63 public:
64 // member functions
65 // NOLINTBEGIN
66 MCNAPI ~Overlays();
67 // NOLINTEND
68
69 public:
70 // destructor thunk
71 // NOLINTBEGIN
72 MCNAPI void $dtor();
73 // NOLINTEND
74 };
75
76 using PauseStateChangeConnector = ::Bedrock::PubSub::Connector<void(bool)>;
77
78 using FrameObjectPtr = ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>;
79
80public:
81 // member variables
82 // NOLINTBEGIN
83 ::ll::TypedStorage<8, 72, ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>>
84 mFrameObject_NoAccessOutsideRender;
85 ::ll::TypedStorage<8, 16, ::LinearAllocator<::FrameRenderObject>> mLinearAllocator;
86 ::ll::TypedStorage<8, 208, ::MinecraftGraphicsPipeline> mMinecraftGraphicsPipeline;
87 ::ll::TypedStorage<8, 8, ::MinecraftGraphics&> mMinecraftGraphics;
88 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IClientInstance>> mClient;
89 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mPrimaryClient;
90 ::ll::TypedStorage<8, 8, ::GameRenderer::Overlays> mOverlays;
91 ::ll::TypedStorage<8, 88, ::mce::RenderGraph> mRenderGraph;
92 ::ll::TypedStorage<4, 24, ::mce::Clock> mClock;
93 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Tessellator>> mTessellator;
94 ::ll::TypedStorage<8, 8, ::TickingTextureStage*> mTickingTextureStage;
95 ::ll::TypedStorage<4, 4, float> mLastClockTime;
96 ::ll::TypedStorage<1, 1, bool> mFlushedInitCommandList;
97 ::ll::TypedStorage<4, 4, int> _tick;
98 ::ll::TypedStorage<2, 2, short> mPointerX;
99 ::ll::TypedStorage<2, 2, short> mPointerY;
100 ::ll::TypedStorage<1, 1, bool> mUseLowFrequencyUIRender;
101 ::ll::TypedStorage<4, 8, ::std::optional<::GameRenderer::FrameCaptureMode>> mFrameCaptureMode;
102 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::InsideCubeRenderer>> mInsideCubeRenderer;
103 ::ll::TypedStorage<8, 8, ::std::chrono::nanoseconds> mLastFrameTime;
104 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::PlayerRenderView>>> mPlayerViews;
105 ::ll::TypedStorage<8, 8, ::optional_ref<::mce::RenderStage>> mDirectOutputStage;
106 ::ll::TypedStorage<8, 8, ::optional_ref<::CommandListQueue>> mCommandListQueue;
107 ::ll::TypedStorage<8, 280, ::std::optional<::ScreenContext>> mCurrentFrameScreenContext;
108 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrix;
109 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelViewMatrixAbsolute;
110 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelProjMatrix;
111 ::ll::TypedStorage<4, 64, ::Matrix> mLastLevelWorldMatrix;
112 ::ll::TypedStorage<4, 64, ::Matrix> mCubemapWorldMatrix;
113 ::ll::TypedStorage<1, 1, bool> mCubemapRotationPaused;
114 ::ll::TypedStorage<8, 8, double> mCubemapRotationSeconds;
115 ::ll::TypedStorage<1, 1, bool> mHasCustomSoftwareCursor;
116 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCustomSoftwareCursorAsset;
117 ::ll::TypedStorage<8, 32, ::std::string> mExperimentsString;
118 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IRenderChunkGarbageCollection>> mGarbageCollection;
119 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPauseSubscription;
120 // NOLINTEND
121
122public:
123 // prevent constructor by default
124 GameRenderer& operator=(GameRenderer const&);
125 GameRenderer(GameRenderer const&);
126 GameRenderer();
127
128public:
129 // virtual functions
130 // NOLINTBEGIN
131 virtual ~GameRenderer();
132 // NOLINTEND
133
134public:
135 // member functions
136 // NOLINTBEGIN
137 MCAPI GameRenderer(::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci, ::MinecraftGraphics& graphics);
138
139 MCAPI void _checkAndDrawInputUI(::ScreenContext& screenContext);
140
141 MCAPI ::std::unique_ptr<::FrameRenderObject, ::std::function<void(::FrameRenderObject*)>>
142 _extractFrame(::ScreenContext& screenContext, bool renderGraphContainsPlayScreen);
143
144 MCAPI void _prepareFrame(::ScreenContext& screenContext);
145
146 MCAPI void _tickLightTexture(::Dimension& dimension, float a);
147
148 MCAPI ::std::weak_ptr<::PlayerRenderView> addPlayerRenderView(::LevelRenderer& renderer);
149
150 MCAPI void cleanupRenderGraph();
151
152 MCAPI void createRenderGraph(::mce::RenderContext& renderContext, bool onResume);
153
154 MCAPI void endFrame(::mce::RenderContext& renderContext);
155
156 MCAPI ::ScreenContext makeScreenContext(float a);
157
158 MCAPI void onSubClientRemoved(::IClientInstance const& client);
159
160 MCAPI void recreateTickingTextureStage();
161
162 MCAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector<void(bool)>& connector);
163
164 MCAPI void renderCurrentFrame(float a);
165
166 MCAPI void renderCursor(::ScreenContext& screenContext, float xMouse, float yMouse);
167
168 MCAPI void renderDebugScreen(::ScreenContext& screenContext, ::IClientInstance& client);
169
170 MCAPI void setClient(::IClientInstance& ci);
171
172 MCAPI void setLevel(::Level* level, ::Dimension* dimension);
173 // NOLINTEND
174
175public:
176 // static variables
177 // NOLINTBEGIN
178 MCAPI static ::mce::Color& mClearColor();
179
180 MCAPI static bool& mSplitScreenActive();
181
182 MCAPI static ::std::string& mVersionString();
183 // NOLINTEND
184
185public:
186 // constructor thunks
187 // NOLINTBEGIN
188 MCAPI void* $ctor(::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci, ::MinecraftGraphics& graphics);
189 // NOLINTEND
190
191public:
192 // destructor thunk
193 // NOLINTBEGIN
194 MCAPI void $dtor();
195 // NOLINTEND
196
197public:
198 // vftables
199 // NOLINTBEGIN
200 MCNAPI static void** $vftable();
201 // NOLINTEND
202};
Definition Connector.h:8
Definition CommandListQueue.h:5
Definition Dimension.h:86
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:250
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