LeviLamina
Loading...
Searching...
No Matches
RenderChunkBuilder.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/block/BakedBlockLightType.h"
7#include "mc/client/renderer/chunks/RenderChunkPerformanceTrackingData.h"
8#include "mc/deps/game_refs/WeakRef.h"
9#include "mc/deps/minecraft_renderer/game/RangeIndices.h"
10#include "mc/world/level/block/BlockRenderLayer.h"
11#include "mc/world/level/chunk/ChunkSourceViewGenerateMode.h"
12#include "mc/world/phys/AABB.h"
13
14// auto generated forward declare list
15// clang-format off
16class Block;
17class BlockPos;
18class BlockSource;
20class ChunkSource;
21class ChunkViewSource;
27class SubChunkPos;
28class Tessellator;
30struct BlockQueueEntry;
32namespace ClientBlockPipeline { class BlockTessellatorPipeline; }
33namespace ClientBlockPipeline { class Description; }
34namespace ClientBlockPipeline { class MaterialRepository; }
35namespace ClientBlockPipeline { class TessellatorContext; }
36namespace mce { class Mesh; }
37namespace mce { class MeshData; }
38namespace mce::framebuilder { struct FrameLightingModelCapabilities; }
39// clang-format on
40
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mLocalSource;
46 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTessellator>> mBlockTessellator;
47 ::ll::TypedStorage<1, 1, bool> mAllDark;
48 ::ll::TypedStorage<1, 1, bool> mSkyLit;
49 ::ll::TypedStorage<1, 1, bool> mBlendCanRenderAsOpaque;
50 ::ll::TypedStorage<4, 4, float> mAverageSkyLight;
51 ::ll::TypedStorage<8, 168, ::std::array<::std::vector<::RenderChunkQuadInfo>, 7>> mFaceMetadata;
52 ::ll::TypedStorage<4, 176, ::std::array<::RangeIndices, 22>> mRenderLayerRanges;
53 ::ll::TypedStorage<8, 8, ::std::vector<::BlockQueueEntry>*> mQueues;
54 ::ll::TypedStorage<8, 8, ::std::vector<::BlockQueueEntry>*> mSimpleOpaqueBlockQueue;
55 ::ll::TypedStorage<8, 176, uint64[22]> mQueueIndexCounts;
56 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Tessellator>> mOwnedTessellator;
57 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository>> mMaterialRepository;
58 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::RuntimeLocalLightingConfig const>> mLocalLightingConfig;
59 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlockPipeline::BlockTessellatorPipeline>> mPipelineTessellator;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlockPipeline::Description>> mPipelineDescription;
61 ::ll::TypedStorage<8, 8, ::Tessellator&> mTessellator;
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::Mesh>> mBuiltMesh;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::MeshData>> mMeshData;
64 ::ll::TypedStorage<1, 1, bool> mGUIRendering;
65 ::ll::TypedStorage<4, 24, ::AABB> mBuildBoundingBox;
66 ::ll::TypedStorage<1, 1, bool> mUseNewTessellationPipeline;
67 ::ll::TypedStorage<1, 1, bool> mTextureShiftsEnabled;
68 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::IRenderChunkGarbage>> mRenderChunkGarbage;
69 ::ll::TypedStorage<8, 16, ::WeakRef<::RenderChunkCoordinator>> mRenderChunkCoordinator;
70 // NOLINTEND
71
72public:
73 // prevent constructor by default
74 RenderChunkBuilder& operator=(RenderChunkBuilder const&);
75 RenderChunkBuilder(RenderChunkBuilder const&);
76 RenderChunkBuilder();
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI RenderChunkBuilder(
82 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
83 ::ChunkSource& mainSource,
84 ::Tessellator& tessellator,
85 ::WeakRef<::RenderChunkCoordinator> coordinator
86 );
87
88 MCAPI RenderChunkBuilder(
89 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
90 ::ChunkSource& mainSource,
91 ::Tessellator& tessellator,
92 ::std::weak_ptr<::IRenderChunkGarbage> garbage
93 );
94
95 MCAPI RenderChunkBuilder(
96 ::MinecraftGameplayGraphicsResources& minecraftGameplayGraphicsResources,
97 ::ClientBlockPipeline::TessellatorContext& pipelineTessellatorContext,
98 ::ChunkSource& mainSource,
99 ::WeakRef<::RenderChunkCoordinator> coordinator
100 );
101
102 MCAPI void _buildRanges(::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails& renderChunkBuildDetails);
103
104 MCAPI void _overrideStaticBlockLighting(
105 ::BlockSource& region,
106 ::SubChunkPos const& subChunkPos,
107 ::AirAndSimpleBlockBits const& airAndSimpleBlocks
108 );
109
110 MCAPI bool _sortBlocks(
111 ::BlockSource& region,
112 ::RenderChunkGeometry& renderChunkGeometry,
113 bool transparentLeaves,
114 ::AirAndSimpleBlockBits& airAndSimpleBlocks,
115 ::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails& renderChunkBuildDetails
116 );
117
118 MCAPI bool _tessellateNewPipeline(
119 ::RenderChunkGeometry& renderChunkGeometry,
120 ::BlockSource&,
121 ::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails& renderChunkBuildDetails
122 );
123
124 MCAPI bool _tessellateQueues(
125 ::RenderChunkGeometry& renderChunkGeometry,
126 ::BlockSource& region,
127 ::AirAndSimpleBlockBits& airAndSimpleBlocks,
128 ::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails& renderChunkBuildDetails
129 );
130
131 MCAPI void _updateFacesMetadata();
132
133 MCAPI void build(
134 ::RenderChunkGeometry& renderChunkGeometry,
135 bool transparentLeaves,
136 ::BakedBlockLightType lightingType,
137 bool forExport,
138 ::mce::framebuilder::FrameLightingModelCapabilities const& lightingModelCapabilities
139 );
140
141 MCAPI void prepareWorldData(::BlockPos const& pos, ::ChunkSourceViewGenerateMode viewMoveMode);
142
143 MCAPI ~RenderChunkBuilder();
144 // NOLINTEND
145
146public:
147 // static functions
148 // NOLINTBEGIN
149 MCAPI static void _checkForAirAndOpaque(
150 int x,
151 int y,
152 int z,
153 ::BlockPos const& min,
154 ::BlockPos const& max,
155 bool guiRendering,
156 ::BlockSource& region,
157 ::AirAndSimpleBlockBits& airAndSimpleBlocks
158 );
159
160 MCAPI static bool checkAndSetSimpleBlockInfo(
161 ::BlockRenderLayer renderLayer,
162 ::Block const& block,
163 uint64 blockBitsetIndex,
164 ::AirAndSimpleBlockBits& airAndSimpleBlocks
165 );
166 // NOLINTEND
167
168public:
169 // constructor thunks
170 // NOLINTBEGIN
171 MCAPI void* $ctor(
172 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
173 ::ChunkSource& mainSource,
174 ::Tessellator& tessellator,
175 ::WeakRef<::RenderChunkCoordinator> coordinator
176 );
177
178 MCAPI void* $ctor(
179 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
180 ::ChunkSource& mainSource,
181 ::Tessellator& tessellator,
182 ::std::weak_ptr<::IRenderChunkGarbage> garbage
183 );
184
185 MCAPI void* $ctor(
186 ::MinecraftGameplayGraphicsResources& minecraftGameplayGraphicsResources,
187 ::ClientBlockPipeline::TessellatorContext& pipelineTessellatorContext,
188 ::ChunkSource& mainSource,
189 ::WeakRef<::RenderChunkCoordinator> coordinator
190 );
191 // NOLINTEND
192
193public:
194 // destructor thunk
195 // NOLINTBEGIN
196 MCAPI void $dtor();
197 // NOLINTEND
198};
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition BlockTessellator.h:5
Definition Block.h:43
Definition ChunkSource.h:38
Definition ChunkViewSource.h:22
Definition BlockTessellatorPipeline.h:7
Definition Description.h:7
Definition MaterialRepository.h:7
Definition TessellatorContext.h:7
Definition IRenderChunkGarbage.h:5
Definition MinecraftGameplayGraphicsResources.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkCoordinator.h:5
Definition RenderChunkGeometry.h:5
Definition RuntimeLocalLightingConfig.h:5
Definition SubChunkPos.h:5
Definition Tessellator.h:5
Definition MeshData.h:7
Definition Mesh.h:7
Definition AirAndSimpleBlockBits.h:5
Definition BlockQueueEntry.h:5
Definition RenderChunkQuadInfo.h:5
Definition FrameLightingModelCapabilities.h:7