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;
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> mUnk752dd6;
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, 24, ::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 void createRenderGraph(::mce::RenderContext& renderContext, bool onResume);
137
138 MCAPI ::ScreenContext makeScreenContext(float a);
139
140 MCAPI void onAppSuspended();
141
142 MCAPI void onSubClientRemoved(::IClientInstance const& client);
143
144 MCAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector<void(bool)>& connector);
145
146 MCAPI void renderCurrentFrame(float a);
147
148 MCAPI void renderDebugScreen(::ScreenContext& screenContext, ::IClientInstance& client);
149
150 MCAPI void setLevel(::Level* level, ::Dimension* dimension);
151
152 MCAPI void tick();
153 // NOLINTEND
154
155public:
156 // static functions
157 // NOLINTBEGIN
158 MCAPI static void setClearColor(::IClientInstance& client, ::ScreenContext& screenContext);
159 // NOLINTEND
160
161public:
162 // static variables
163 // NOLINTBEGIN
164 MCAPI static ::mce::Color& mClearColor();
165
166 MCAPI static bool& mSplitScreenActive();
167
168 MCAPI static ::std::string& mVersionString();
169 // NOLINTEND
170
171public:
172 // constructor thunks
173 // NOLINTBEGIN
174 MCAPI void* $ctor(
175 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> const& ci,
176 ::MinecraftGraphics& graphics,
177 ::Bedrock::NotNullNonOwnerPtr<::FrameAnomalyDetector> const& frameAnomalyDetector
178 );
179 // NOLINTEND
180};
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 Level.h:254
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