3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/block/BakedBlockLightType.h"
7#include "mc/common/SubClientId.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/ecs/EntityId.h"
10#include "mc/deps/minecraft_renderer/game/RangeIndices.h"
11#include "mc/util/Bounds.h"
12#include "mc/world/level/BlockPos.h"
13#include "mc/world/level/Tick.h"
32namespace mce {
class Mesh; }
43 enum class Bit : uchar {
46 RayTracingModeOnAtBuildStart = 2,
47 RayTracingModeOnAtBuildEnd = 3,
50 BlendCanRenderAsOpaque = 6,
57 ::ll::TypedStorage<8, 8, ::Tick> mLastChangeTick;
58 ::ll::TypedStorage<8, 8, ::Tick> mFirstChangeTick;
63 variant<::std::monostate, ::std::shared_ptr<::mce::Mesh>, ::std::shared_ptr<::RenderChunkDirectVertexData>>>
65 ::ll::TypedStorage<4, 4, ::std::bitset<7>> mFlags;
66 ::ll::TypedStorage<4, 4, float> mReadyTime;
67 ::ll::TypedStorage<4, 4, int> mBuildIterationCount;
68 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
69 ::ll::TypedStorage<4, 12, ::BlockPos> mCenter;
70 ::ll::TypedStorage<4, 48, ::Bounds> mDataBounds;
71 ::ll::TypedStorage<4, 192, ::std::array<::RangeIndices, 24>> mUnsortedIndexRange;
72 ::ll::TypedStorage<4, 4, ::EntityId> mEntityId;
73 ::ll::TypedStorage<8, 112, ::std::array<::std::shared_ptr<::FaceSortingMetaDataBase>, 7>> mFaceSortingMetaData;
74 ::ll::TypedStorage<4, 176, ::std::array<::RangeIndices, 22>> mRenderLayerIndexRanges;
75 ::ll::TypedStorage<4, 4, float> mAverageSkyLight;
76 ::ll::TypedStorage<4, 4, ::std::bitset<6>> mInterlockBitField;
77 ::ll::TypedStorage<1, 6, ::std::array<uchar, 6>> mInterlockNeighborVersionNumbers;
78 ::ll::TypedStorage<1, 1, uchar> mBuildVersionNumber;
79 ::ll::TypedStorage<8, 24, ::std::vector<::BlockQueueEntry>> mPointLightCandidates;
80 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::IRenderChunkGarbage>> mRenderChunkGarbage;
85 RenderChunkGeometry();
90 MCAPI RenderChunkGeometry(
92 bool immediateChangeRequested,
93 int buildIterationCount,
94 double overrideReadyTime,
96 ::std::weak_ptr<::IRenderChunkGarbage> garbage,
100 MCAPI
void _convertFaceMetaDataToFaceSortingMetaData(
101 ::std::array<::std::vector<::RenderChunkQuadInfo>, 7>
const& faceMetadata,
105 MCAPI
void _resetFaceMetadata();
107 MCAPI
bool didRayTracingModeChangeDuringBuild()
const;
109 MCAPI uint64 endFaceSortOnly(
110 ::mce::BufferResourceService& bufferResourceService,
111 ::RenderChunkSorter& sorter,
114 ::std::shared_ptr<::mce::IndexBufferContainer>,
115 ::std::shared_ptr<::RenderChunkDirectIndexData>>& nextIndices,
116 ::std::array<::RangeIndices, 24>& sortedIndexRange,
117 ::dragon::RenderMetadata
const& renderMetadata
120 MCAPI
void endRebuild(
121 ::RenderChunkBuilder& builder,
122 ::mce::BufferResourceService& bufferResourceService,
124 ::dragon::RenderMetadata
const& renderMetadata,
128 MCAPI ::mce::TexturePtr
const& getDiffuseTexture(::TerrainLayer
const& layer)
const;
130 MCFOLD ::std::variant<
132 ::std::shared_ptr<::mce::Mesh>,
133 ::std::shared_ptr<::RenderChunkDirectVertexData>>
const&
136 MCFOLD ::std::vector<::BlockQueueEntry>
const& getPointLightCandidates()
const;
138 MCAPI
bool isEmpty()
const;
140 MCAPI
bool isMeshValid()
const;
142 MCAPI
bool isReady()
const;
144 MCAPI
void prefetchMeshPtr()
const;
147 ::RenderChunkBuilder& builder,
149 ::BakedBlockLightType forExport,
150 bool lightingModelCapabilities,
151 ::mce::framebuilder::FrameLightingModelCapabilities
const&
156 MCAPI
void startRebuild(::RenderChunkBuilder& builder, ::Vec3
const&);
158 MCAPI ~RenderChunkGeometry();
164 MCAPI static ::std::vector<::mce::ServerTexture> createTerrainTextureList(::SubClientId player);
166 MCAPI
static void deinitTextures();
168 MCAPI
static void initTextures(
169 ::Bedrock::NotNullNonOwnerPtr<::MinecraftGraphics>
const& minecraftGraphics,
170 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
171 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const>
const& atlas
178 MCAPI static ::std::unique_ptr<::TerrainTextures>& mTerrainTextures();
186 bool immediateChangeRequested,
187 int buildIterationCount,
188 double overrideReadyTime,
190 ::std::weak_ptr<::IRenderChunkGarbage> garbage,
Definition IRenderChunkGarbage.h:5
Definition MinecraftGraphics.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkGeometry.h:5
Definition RenderChunkSorter.h:5
Definition TerrainLayer.h:5
Definition TerrainTextures.h:5
Definition TextureAtlas.h:5
Definition IndexBufferContainer.h:7
Definition TextureGroup.h:7
Definition TexturePtr.h:7
Definition BlockQueueEntry.h:5
Definition RenderChunkDirectIndexData.h:5
Definition RenderChunkDirectVertexData.h:5
Definition RenderChunkQuadInfo.h:5
Definition BufferResourceService.h:7
Definition ServerTexture.h:7
Definition FrameLightingModelCapabilities.h:7