3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/debug/DebugRenderer.h"
7#include "mc/client/renderer/game/LevelBuilder.h"
8#include "mc/client/renderer/game/ShadowCascadeState.h"
9#include "mc/client/renderer/scripting/Renderer.h"
10#include "mc/deps/application/AppPlatformListener.h"
11#include "mc/deps/application/LowMemorySeverity.h"
12#include "mc/deps/core/math/Color.h"
13#include "mc/deps/core/utility/NonOwnerPointer.h"
14#include "mc/deps/core/utility/pub_sub/Subscription.h"
15#include "mc/deps/ecs/WeakEntityRef.h"
16#include "mc/deps/game_refs/OwnerPtr.h"
17#include "mc/deps/game_refs/StackRefResult.h"
18#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
19#include "mc/world/level/BlockChangedEventTarget.h"
20#include "mc/world/level/LevelListener.h"
21#include "mc/world/level/Tick.h"
71namespace mce {
class Mesh; }
80 ::ll::TypedStorage<8, 64, ::std::unordered_map<::DimensionType, ::OwnerPtr<::RenderChunkCoordinator>>>
81 mRenderChunkCoordinators;
82 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PointLighting::PointLightCoordinator>> mPointLightCoordinator;
83 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PointLighting::PointLightShadowProbeManager>>
84 mPointLightShadowProbeManager;
85 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPointLightLODOptionSubscription;
86 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPointLightShadowOptionSubscription;
87 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LightPropagation::LightVolumeManager>> mLightVolumeManager;
88 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LightPropagation::LightPropagationCoordinator>>
89 mLightPropagationCoordinator;
90 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::TextureGroup>> mTextureGroup;
91 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mShadowCylinder;
92 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mShadowOverlayCube;
93 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mShadowDisc;
94 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mSkyMesh;
95 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mStarsMesh;
96 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mEndSkyMesh;
97 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mSunMesh;
98 ::ll::TypedStorage<8, 128, ::std::shared_ptr<::mce::Mesh>[8]> mMoonMesh;
99 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Mesh>> mNameplateBackgroundMesh;
100 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mAtlasTexture;
101 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mBrightnessTex;
102 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mSunTex;
103 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mSunTexVibrantVisuals;
104 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mMoonTex;
105 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mEndSkyTex;
106 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mEndFlashTex;
107 ::ll::TypedStorage<8, 24, ::std::vector<::mce::TexturePtr>> mCrackFrames;
108 ::ll::TypedStorage<1, 1, ::DebugRenderer> mDebugRenderer;
109 ::ll::TypedStorage<8, 192, ::Scripting::RenderHelper::Renderer> mScriptDebugRenderer;
110 ::ll::TypedStorage<8, 8, ::Tick> mTicks;
111 ::ll::TypedStorage<8, 8, ::BlockActorRenderDispatcher&> mBlockEntityRenderDispatcher;
112 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTessellator>> mLocalRenderer;
113 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ParticleEngine>> mParticleEngine;
114 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ParticleSystemEngine>> mParticleSystemEngine;
115 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GeometryEditorGui>> mGeometryEditorGui;
116 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
117 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mSyncTaskGroup;
118 ::ll::TypedStorage<8, 8, ::GameRenderer&> mGameRenderer;
119 ::ll::TypedStorage<8, 8, ::MultiPlayerLevel&> mLevel;
120 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::OptionRegistry>> mOptions;
121 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClientInstance;
122 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mLocalUser;
123 ::ll::TypedStorage<8, 64, ::std::function<void()>> mReleaseParticleSystemInterfaceProxyCallback;
124 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelRendererPlayer>> mLevelRendererPlayer;
125 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelRendererShadowCamera>> mLevelRendererShadowCamera;
126 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelRendererShadowCamera>> mLevelRendererCloudShadowCamera;
127 ::ll::TypedStorage<4, 4, ::ShadowCascadeState> mShadowCascadeState;
128 ::ll::TypedStorage<1, 1, bool> mTextureShiftsEnabled;
129 ::ll::TypedStorage<8, 1456, ::LevelBuilder> mLevelBuilder;
130 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelRendererProxy>> mProxy;
131 ::ll::TypedStorage<4, 16, ::mce::Color> mClearBufferColor;
132 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::PlayerRenderView>> mPlayerView;
133 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DataDrivenRendererV2RequiredData>> mDataDrivenRendererV2RequiredData;
138 LevelRenderer& operator=(LevelRenderer
const&);
139 LevelRenderer(LevelRenderer
const&);
145 virtual ~LevelRenderer() ;
147 virtual void onAppSuspended() ;
149 virtual void onAppResumed() ;
151 virtual void onDeviceLost() ;
153 virtual void onLowMemory(::LowMemorySeverity) ;
155 virtual void onBlockChanged(
156 ::BlockSource& source,
157 ::BlockPos
const& pos,
159 ::Block
const& block,
160 ::Block
const& oldBlock,
162 ::ActorBlockSyncMessage
const* syncMsg,
163 ::BlockChangedEventTarget eventTarget,
164 ::Actor* blockChangeSource
167 virtual void onChunkUnloaded(::LevelChunk& levelChunk) ;
169 virtual void takePicture(
170 ::cg::ImageBuffer& outImage,
173 ::ScreenshotOptions& screenshotOptions,
174 ::std::function<
void(::cg::ImageBuffer&, ::ScreenshotOptions&)> completedScreenshotCallback
182 ::IClientInstance& clientInstance,
183 ::MultiPlayerLevel& level,
184 ::std::shared_ptr<::OptionRegistry> options,
185 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
186 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const>
const& terrainTexture,
187 ::WeakEntityRef localUser,
188 ::GameRenderer& gameRenderer,
189 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface>
const& soundPlayer,
190 ::Bedrock::NotNullNonOwnerPtr<::GeometryGroup>
const& geometryGroup,
191 ::SoundMapping
const& sounds,
192 ::Bedrock::NotNullNonOwnerPtr<::ActorResourceDefinitionGroup const>
const& actorResourceDefinitionGroup,
193 ::Bedrock::NotNullNonOwnerPtr<::TextureShiftManager const>& textureShiftManager
196 MCAPI
void _createMeshes(::Tessellator& tessellator);
198 MCAPI
void _createParticleEngines();
200 MCAPI
void _debugDrawClientSideChunkGenBlockDifferences();
202 MCAPI
void _initPipelineTessellatorResources(
203 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const> textureAtlas,
204 ::Bedrock::NotNullNonOwnerPtr<::TextureShiftManager const> textureShiftManager
207 MCAPI
void _initResources();
209 MCAPI
void _resetMeshes();
211 MCAPI
void _setLevelRendererCameras();
213 MCAPI
void endFrame(::mce::TextureResourceService& textureResourceService);
215 MCAPI
void frameUpdate(::ClientFrameUpdateContext& clientFrameUpdateContext);
217 MCAPI ::BlockTessellator& getBlockRenderer();
219 MCAPI ::mce::Color
const& getClearBufferColor()
const;
221 MCAPI ::DataDrivenRendererV2RequiredData* getDataDrivenRendererV2RequiredData();
223 MCAPI ::std::shared_ptr<::ActorRenderDispatcher> getEntityRenderDispatcher();
225 MCAPI ::std::shared_ptr<::LevelRendererShadowCamera> getLevelRendererCloudShadowCamera();
227 MCFOLD ::LevelRendererPlayer
const& getLevelRendererPlayer()
const;
229 MCFOLD ::LevelRendererPlayer& getLevelRendererPlayer();
231 MCAPI ::std::shared_ptr<::LevelRendererShadowCamera> getLevelRendererShadowCamera();
233 MCAPI ::std::weak_ptr<::LightPropagation::LightPropagationCoordinator> getLightPropagationCoordinator();
235 MCFOLD ::std::weak_ptr<::LightPropagation::LightVolumeManager> getLightVolumeManager();
237 MCFOLD ::std::weak_ptr<::LightPropagation::LightVolumeManager const> getLightVolumeManagerConst()
const;
239 MCAPI ::ParticleEngine& getParticleEngine()
const;
241 MCAPI ::ParticleSystemEngine& getParticleSystemEngine()
const;
243 MCAPI ::StackRefResult<::RenderChunkCoordinator> getRenderChunkCoordinator(::DimensionType dimID);
245 MCAPI ::IRenderChunkGarbageCollection& getRenderChunkGarbageCollection();
247 MCAPI ::Bedrock::NotNullNonOwnerPtr<::ClientBlockPipeline::SchematicsRepository> getSchematicsRepository()
const;
249 MCFOLD ::Scripting::RenderHelper::RendererInterface& getScriptRendererInterface();
251 MCAPI
bool getTextureShiftsEnabled()
const;
253 MCFOLD ::Tick
const& getTicks()
const;
255 MCAPI ::DataDrivenRendererContinuousData* getV2ContinuousData();
257 MCAPI ::ProcessedDataDrivenRenderers
const* getV2ProcessedDataDrivenRenderers()
const;
259 MCAPI
bool getV2ShouldRenderActorsWithAttachables()
const;
261 MCAPI
void onDimensionChanged();
263 MCAPI
void onOptionsChanged();
265 MCAPI
void onWillChangeDimension();
267 MCAPI
void preRenderUpdate(
268 ::ScreenContext& screenContext,
269 ::LevelRenderPreRenderUpdateParameters& levelRenderPreRenderUpdateParameters
272 MCAPI
void rebuildAllDDRv2Geometry();
274 MCAPI
void rebuildAllRenderChunkGeometry();
277 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const>
const& terrainTexture,
278 ::Bedrock::NotNullNonOwnerPtr<::GeometryGroup>
const& geometryGroup,
279 ::Bedrock::NotNullNonOwnerPtr<::ActorResourceDefinitionGroup const>
const& actorResourceDefinitionGroup
282 MCAPI
void relightAllRenderChunkGeometry();
284 MCAPI
void renderLevel(::ScreenContext& screenContext, ::FrameRenderObject
const& renderObj);
286 MCAPI
void resetCameras();
288 MCAPI
void resetLightVolumeManager(::std::weak_ptr<::RuntimeLocalLightingConfig const> runtimeLocalLightingConfig);
290 MCAPI
void resetLightingConfig(::std::weak_ptr<::RuntimeLocalLightingConfig const> runtimeLocalLightingConfig);
292 MCAPI
void resetPointLighting();
294 MCAPI
void tickLevelRenderer();
300 MCAPI
static float const& Z_NEAR();
307 ::IClientInstance& clientInstance,
308 ::MultiPlayerLevel& level,
309 ::std::shared_ptr<::OptionRegistry> options,
310 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
311 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const>
const& terrainTexture,
312 ::WeakEntityRef localUser,
313 ::GameRenderer& gameRenderer,
314 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface>
const& soundPlayer,
315 ::Bedrock::NotNullNonOwnerPtr<::GeometryGroup>
const& geometryGroup,
316 ::SoundMapping
const& sounds,
317 ::Bedrock::NotNullNonOwnerPtr<::ActorResourceDefinitionGroup const>
const& actorResourceDefinitionGroup,
318 ::Bedrock::NotNullNonOwnerPtr<::TextureShiftManager const>& textureShiftManager
331 MCAPI
void $onAppSuspended();
333 MCAPI
void $onAppResumed();
335 MCAPI
void $onDeviceLost();
337 MCAPI
void $onLowMemory(::LowMemorySeverity);
339 MCAPI
void $onBlockChanged(
340 ::BlockSource& source,
341 ::BlockPos
const& pos,
343 ::Block
const& block,
344 ::Block
const& oldBlock,
346 ::ActorBlockSyncMessage
const* syncMsg,
347 ::BlockChangedEventTarget eventTarget,
348 ::Actor* blockChangeSource
351 MCAPI
void $onChunkUnloaded(::LevelChunk& levelChunk);
353 MCAPI
void $takePicture(
354 ::cg::ImageBuffer& outImage,
357 ::ScreenshotOptions& screenshotOptions,
358 ::std::function<
void(::cg::ImageBuffer&, ::ScreenshotOptions&)> completedScreenshotCallback
Definition ActorRenderDispatcher.h:5
Definition ActorResourceDefinitionGroup.h:5
Definition BlockActorRenderDispatcher.h:5
Definition BlockSource.h:72
Definition BlockTessellator.h:5
Definition SchematicsRepository.h:7
Definition ClientFrameUpdateContext.h:5
Definition DataDrivenRendererV2RequiredData.h:5
Definition GameRenderer.h:5
Definition GeometryEditorGui.h:5
Definition GeometryGroup.h:5
Definition IClientInstance.h:5
Definition IRenderChunkGarbageCollection.h:5
Definition LevelChunk.h:87
Definition LevelListener.h:28
Definition LevelRendererPlayer.h:5
Definition LevelRendererProxy.h:5
Definition LevelRendererShadowCamera.h:5
Definition LevelRenderer.h:5
static MCAPI void ** $vftableForLevelListener()
static MCAPI void ** $vftableForAppPlatformListener()
Definition LightPropagationCoordinator.h:7
Definition LightVolumeManager.h:7
Definition MultiPlayerLevel.h:5
Definition OptionRegistry.h:5
Definition ParticleEngine.h:5
Definition ParticleSystemEngine.h:5
Definition PlayerRenderView.h:5
Definition PointLightCoordinator.h:7
Definition PointLightShadowProbeManager.h:7
Definition RenderChunkCoordinator.h:5
Definition RuntimeLocalLightingConfig.h:5
Definition ScreenContext.h:5
Definition RendererInterface.h:7
Definition SoundMapping.h:5
Definition SoundPlayerInterface.h:22
Definition TaskGroup.h:55
Definition Tessellator.h:5
Definition TextureAtlas.h:5
Definition TextureShiftManager.h:5
Definition ImageBuffer.h:16
Definition TextureGroup.h:7
Definition ActorBlockSyncMessage.h:8
Definition DataDrivenRendererContinuousData.h:5
Definition FrameRenderObject.h:5
Definition LevelRenderPreRenderUpdateParameters.h:5
Definition ProcessedDataDrivenRenderers.h:5
Definition ScreenshotOptions.h:9
Definition TextureResourceService.h:7