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/chunk/ChunkSourceViewGenerateMode.h"
11#include "mc/world/phys/AABB.h"
12
13// auto generated forward declare list
14// clang-format off
15class Block;
16class BlockPos;
17class BlockSource;
18class ChunkSource;
19class ChunkViewSource;
20class Tessellator;
22struct BlockQueueEntry;
23struct BlockTessellator;
30namespace ClientBlockPipeline { struct BlockTessellatorPipeline; }
31namespace ClientBlockPipeline { struct Description; }
32namespace ClientBlockPipeline { struct MaterialRepository; }
33namespace ClientBlockPipeline { struct TessellatorContext; }
34namespace mce { class Mesh; }
35namespace mce { class MeshData; }
36namespace mce::framebuilder { struct FrameLightingModelCapabilities; }
37// clang-format on
38
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mLocalSource;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTessellator>> mBlockTessellator;
45 ::ll::TypedStorage<1, 1, bool> mAllDark;
46 ::ll::TypedStorage<1, 1, bool> mSkyLit;
47 ::ll::TypedStorage<1, 1, bool> mBlendCanRenderAsOpaque;
48 ::ll::TypedStorage<4, 4, float> mAverageSkyLight;
49 ::ll::TypedStorage<8, 168, ::std::array<::std::vector<::RenderChunkQuadInfo>, 7>> mFaceMetadata;
50 ::ll::TypedStorage<4, 136, ::std::array<::RangeIndices, 17>> mRenderLayerRanges;
51 ::ll::TypedStorage<8, 8, ::std::vector<::BlockQueueEntry>*> mQueues;
52 ::ll::TypedStorage<8, 8, ::std::vector<::BlockQueueEntry>*> mSimpleOpaqueBlockQueue;
53 ::ll::TypedStorage<8, 136, uint64[17]> mQueueIndexCounts;
54 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Tessellator>> mOwnedTessellator;
55 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository>> mMaterialRepository;
56 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::RuntimeLocalLightingConfig const>> mLocalLightingConfig;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlockPipeline::BlockTessellatorPipeline>> mPipelineTessellator;
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlockPipeline::Description>> mPipelineDescription;
59 ::ll::TypedStorage<8, 8, ::Tessellator&> mTessellator;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::Mesh>> mBuiltMesh;
61 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::MeshData>> mMeshData;
62 ::ll::TypedStorage<1, 1, bool> mGUIRendering;
63 ::ll::TypedStorage<4, 24, ::AABB> mBuildBoundingBox;
64 ::ll::TypedStorage<1, 1, bool> mUseNewTessellationPipeline;
65 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::IRenderChunkGarbage>> mRenderChunkGarbage;
66 ::ll::TypedStorage<8, 16, ::WeakRef<::RenderChunkCoordinator>> mRenderChunkCoordinator;
67 // NOLINTEND
68
69public:
70 // prevent constructor by default
71 RenderChunkBuilder& operator=(RenderChunkBuilder const&);
74
75public:
76 // member functions
77 // NOLINTBEGIN
79 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
80 ::ChunkSource& mainSource,
81 ::Tessellator& tessellator,
83 );
84
86 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
87 ::ChunkSource& mainSource,
88 ::Tessellator& tessellator,
89 ::std::weak_ptr<::IRenderChunkGarbage> garbage
90 );
91
93 ::MinecraftGameplayGraphicsResources& minecraftGameplayGraphicsResources,
94 ::ClientBlockPipeline::TessellatorContext& pipelineTessellatorContext,
95 ::ChunkSource& mainSource,
97 );
98
100
101 MCNAPI bool _sortBlocks(
102 ::BlockSource& region,
103 ::RenderChunkGeometry& renderChunkGeometry,
104 bool transparentLeaves,
105 ::AirAndSimpleBlockBits& airAndSimpleBlocks,
107 );
108
109 MCNAPI bool _tessellateQueues(
110 ::RenderChunkGeometry& renderChunkGeometry,
111 ::BlockSource& region,
112 ::AirAndSimpleBlockBits& airAndSimpleBlocks,
114 );
115
116 MCNAPI void _updateFacesMetadata();
117
118 MCNAPI void build(
119 ::RenderChunkGeometry& renderChunkGeometry,
120 bool transparentLeaves,
121 ::BakedBlockLightType lightingType,
122 bool forExport,
123 ::mce::framebuilder::FrameLightingModelCapabilities const& lightingModelCapabilities
124 );
125
126 MCNAPI void prepareWorldData(::BlockPos const& pos, ::ChunkSourceViewGenerateMode viewMoveMode);
127
129 // NOLINTEND
130
131public:
132 // static functions
133 // NOLINTBEGIN
135 ::Block const& block,
136 uint64 blockBitsetIndex,
137 ::AirAndSimpleBlockBits& airAndSimpleBlocks
138 );
139 // NOLINTEND
140
141public:
142 // constructor thunks
143 // NOLINTBEGIN
144 MCNAPI void* $ctor(
145 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
146 ::ChunkSource& mainSource,
147 ::Tessellator& tessellator,
149 );
150
151 MCNAPI void* $ctor(
152 ::std::shared_ptr<::ClientBlockPipeline::MaterialRepository> const& materialRepository,
153 ::ChunkSource& mainSource,
154 ::Tessellator& tessellator,
155 ::std::weak_ptr<::IRenderChunkGarbage> garbage
156 );
157
158 MCNAPI void* $ctor(
159 ::MinecraftGameplayGraphicsResources& minecraftGameplayGraphicsResources,
160 ::ClientBlockPipeline::TessellatorContext& pipelineTessellatorContext,
161 ::ChunkSource& mainSource,
163 );
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCNAPI void $dtor();
170 // NOLINTEND
171};
Definition BlockPos.h:14
Definition BlockSource.h:63
Definition Block.h:45
Definition ChunkSource.h:37
Definition ChunkViewSource.h:22
Definition RenderChunkBuilder.h:39
MCAPI bool _tessellateQueues(::RenderChunkGeometry &renderChunkGeometry, ::BlockSource &region, ::AirAndSimpleBlockBits &airAndSimpleBlocks, ::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails &renderChunkBuildDetails)
MCAPI void * $ctor(::MinecraftGameplayGraphicsResources &minecraftGameplayGraphicsResources, ::ClientBlockPipeline::TessellatorContext &pipelineTessellatorContext, ::ChunkSource &mainSource, ::WeakRef<::RenderChunkCoordinator > coordinator)
MCAPI void * $ctor(::std::shared_ptr<::ClientBlockPipeline::MaterialRepository > const &materialRepository, ::ChunkSource &mainSource, ::Tessellator &tessellator, ::std::weak_ptr<::IRenderChunkGarbage > garbage)
MCAPI ~RenderChunkBuilder()
MCAPI void prepareWorldData(::BlockPos const &pos, ::ChunkSourceViewGenerateMode viewMoveMode)
MCAPI void _buildRanges(::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails &renderChunkBuildDetails)
MCAPI bool _sortBlocks(::BlockSource &region, ::RenderChunkGeometry &renderChunkGeometry, bool transparentLeaves, ::AirAndSimpleBlockBits &airAndSimpleBlocks, ::RenderChunkPerformanceTrackingData::RenderChunkBuildDetails &renderChunkBuildDetails)
static MCAPI void checkNeighborBlockIsAirOrSimpleBlock(::Block const &block, uint64 blockBitsetIndex, ::AirAndSimpleBlockBits &airAndSimpleBlocks)
MCAPI void _updateFacesMetadata()
MCAPI void build(::RenderChunkGeometry &renderChunkGeometry, bool transparentLeaves, ::BakedBlockLightType lightingType, bool forExport, ::mce::framebuilder::FrameLightingModelCapabilities const &lightingModelCapabilities)
MCAPI RenderChunkBuilder(::std::shared_ptr<::ClientBlockPipeline::MaterialRepository > const &materialRepository, ::ChunkSource &mainSource, ::Tessellator &tessellator, ::std::weak_ptr<::IRenderChunkGarbage > garbage)
MCAPI void * $ctor(::std::shared_ptr<::ClientBlockPipeline::MaterialRepository > const &materialRepository, ::ChunkSource &mainSource, ::Tessellator &tessellator, ::WeakRef<::RenderChunkCoordinator > coordinator)
MCAPI RenderChunkBuilder(::MinecraftGameplayGraphicsResources &minecraftGameplayGraphicsResources, ::ClientBlockPipeline::TessellatorContext &pipelineTessellatorContext, ::ChunkSource &mainSource, ::WeakRef<::RenderChunkCoordinator > coordinator)
MCAPI void $dtor()
MCAPI RenderChunkBuilder(::std::shared_ptr<::ClientBlockPipeline::MaterialRepository > const &materialRepository, ::ChunkSource &mainSource, ::Tessellator &tessellator, ::WeakRef<::RenderChunkCoordinator > coordinator)
Definition Tessellator.h:19
Definition WeakRef.h:6
Definition AirAndSimpleBlockBits.h:5
Definition BlockQueueEntry.h:5
Definition BlockTessellator.h:5
Definition TessellatorContext.h:7
Definition Description.h:11
Definition IRenderChunkGarbage.h:5
Definition MinecraftGameplayGraphicsResources.h:5
Definition RenderChunkCoordinator.h:5
Definition RenderChunkGeometry.h:5
Definition RenderChunkPerformanceTrackingData.h:20
Definition RenderChunkQuadInfo.h:5
Definition RuntimeLocalLightingConfig.h:5
Definition FrameLightingModelCapabilities.h:7