Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RenderChunkShared.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/chunks/VisibilityNode.h"
7#include "mc/deps/core/utility/buffer_span.h"
8#include "mc/deps/minecraft_renderer/framebuilder/dragon/RenderMetadata.h"
9#include "mc/world/level/ActorBlockSyncMessage.h"
10#include "mc/world/level/BlockActorBlockSyncMessage.h"
11#include "mc/world/level/BlockPos.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockSource;
18class SubChunkPos;
19class Vec3;
20namespace RenderChunkVertexStreaming { class RenderChunkVertexStreamPlanRegistry; }
21namespace mce { struct BufferResourceService; }
22// clang-format on
23
25public:
26 // RenderChunkShared inner types declare
27 // clang-format off
30 // clang-format on
31
32 // RenderChunkShared inner types define
33 enum class VisibilityBuildState : int {
34 Dirty = 0,
35 Building = 1,
36 BuildingButDirty = 2,
37 Ready = 3,
38 };
39
40 enum class DataState : int {
41 WontLoad = 0,
42 Loading = 1,
43 Loaded = 2,
44 };
45
46 enum class BuildState : int {
47 Building = 0,
48 NotBuldingOrSorting = 1,
49 };
50
52 public:
53 // member variables
54 // NOLINTBEGIN
55 ::ll::TypedStorage<8, 16, ::ActorBlockSyncMessage> mEntityBlockSyncMessage;
56 ::ll::TypedStorage<1, 1, uchar> mRenderChunkGeometryVersion;
57 // NOLINTEND
58 };
59
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<4, 16, ::BlockActorBlockSyncMessage> mBlockEntityBlockSyncMessage;
65 ::ll::TypedStorage<1, 1, uchar> mRenderChunkGeometryVersion;
66 // NOLINTEND
67 };
68
69public:
70 // member variables
71 // NOLINTBEGIN
72 ::ll::TypedStorage<1, 1, bool> mEmpty;
73 ::ll::TypedStorage<1, 1, bool> mSkyLit;
74 ::ll::TypedStorage<1, 1, bool> mAllDark;
75 ::ll::TypedStorage<1, 1, bool> mImmediateChangeRequested;
76 ::ll::TypedStorage<4, 4, ::std::atomic<::RenderChunkShared::BuildState>> mBuildState;
77 ::ll::TypedStorage<4, 12, ::BlockPos> mCenter;
78 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
79 ::ll::TypedStorage<4, 4, ::std::atomic<::RenderChunkShared::VisibilityBuildState>> mVisibilityBuildState;
80 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkGeometry>> mCurrentRenderChunkGeometry;
81 ::ll::TypedStorage<1, 6, ::VisibilityNode> mVisibility;
82 ::ll::TypedStorage<1, 1, bool> mVisibilityMatrixChanged;
83 ::ll::TypedStorage<1, 1, uchar> mVisibleCameraSet;
84 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkGeometry>> mBuildingRenderChunkGeometry;
85 ::ll::TypedStorage<8, 24, ::std::vector<::RenderChunkShared::ActorBlockSyncMessageWithVersion>>
86 mEntityBlockMessageList;
87 ::ll::TypedStorage<8, 24, ::std::vector<::RenderChunkShared::BlockActorBlockSyncMessageWithVersion>>
88 mBlockEntityBlockMessageList;
89 ::ll::TypedStorage<8, 56, ::dragon::RenderMetadata> mRenderMetadata;
90 // NOLINTEND
91
92public:
93 // prevent constructor by default
94 RenderChunkShared();
95
96public:
97 // member functions
98 // NOLINTBEGIN
99 MCAPI explicit RenderChunkShared(::SubChunkPos const& rcp);
100
102
104
105 MCNAPI void endRebuild(
106 ::RenderChunkBuilder& builder,
107 ::mce::BufferResourceService& bufferResourceService,
108 ::RenderChunkVertexStreaming::RenderChunkVertexStreamPlanRegistry const& renderChunkVertexStreamPlanRegistry,
109 bool useSplitStream
110 );
111
112 MCNAPI ::std::vector<::BlockActorBlockSyncMessage> getAndPruneBlockEntityBlockSyncMessages(uchar version);
113
114 MCNAPI ::std::vector<::ActorBlockSyncMessage> getAndPruneEntityBlockSyncMessages(uchar version);
115
116 MCNAPI void rebuildVisbility(::BlockSource& region);
117
119
120 MCAPI void startRebuild(::RenderChunkBuilder& builder, ::Vec3 const& currentCameraPosition);
121
122 MCAPI ~RenderChunkShared();
123 // NOLINTEND
124
125public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCAPI void* $ctor(::SubChunkPos const& rcp);
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCAPI void $dtor();
135 // NOLINTEND
136};
Definition BlockSource.h:72
Definition RenderChunkBuilder.h:5
Definition RenderChunkGeometry.h:5
Definition RenderChunkShared.h:5
MCAPI ::std::vector<::BlockActorBlockSyncMessage > getAndPruneBlockEntityBlockSyncMessages(uchar version)
MCAPI ::std::vector<::ActorBlockSyncMessage > getAndPruneEntityBlockSyncMessages(uchar version)
MCAPI void addEntityBlockSyncMessages(::buffer_span<::ActorBlockSyncMessage > syncMsgList)
MCAPI void setVisibilityToEmptyAndSkyLit()
MCAPI void rebuildVisbility(::BlockSource &region)
MCAPI void endRebuild(::RenderChunkBuilder &builder, ::mce::BufferResourceService &bufferResourceService, ::RenderChunkVertexStreaming::RenderChunkVertexStreamPlanRegistry const &renderChunkVertexStreamPlanRegistry, bool useSplitStream)
MCAPI void addBlockEntityBlockSyncMessages(::buffer_span<::BlockActorBlockSyncMessage > syncMsgList)
Definition RenderChunkVertexStreamPlanRegistry.h:7
Definition SubChunkPos.h:5
Definition Vec3.h:10
Definition buffer_span.h:6
Definition BufferResourceService.h:7