Class SectionRenderDispatcher
java.lang.Object
net.minecraft.client.renderer.chunk.SectionRenderDispatcher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final recordprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SectionBufferBuilderPoolprivate final AtomicReference<Vec3> private final Map<ChunkSectionLayer, SectionRenderDispatcher.SectionUberBuffers> private booleanprivate final ReentrantLockprivate final TracingExecutorprivate final SectionBufferBuilderPackstatic final intprivate final Consumer<SectionRenderDispatcher.RenderSection> private final SectionTaskDynamicQueueprivate SectionCompilerprivate final StagingBuffer -
Constructor Summary
ConstructorsConstructorDescriptionSectionRenderDispatcher(TracingExecutor executor, RenderBuffers renderBuffers, SectionCompiler sectionCompiler, Consumer<SectionRenderDispatcher.RenderSection> onSectionMeshUpdate) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()intintgetRenderSectionSlice(SectionMesh sectionMesh, ChunkSectionLayer layer) getStats()booleanvoidlock()private voidrunTask()private voidvoidsetCameraPosition(Vec3 cameraPosition) voidsetCompiler(SectionCompiler sectionCompiler) voidunlock()void
-
Field Details
-
NEARBY_SECTION_DISTANCE_IN_BLOCKS
public static final int NEARBY_SECTION_DISTANCE_IN_BLOCKS- See Also:
-
queue
-
fixedBuffers
-
bufferPool
-
closed
private volatile boolean closed -
executor
-
onSectionMeshUpdate
-
cameraPosition
-
sectionCompiler
-
stagingBuffer
-
chunkUberBuffers
-
copyLock
-
-
Constructor Details
-
SectionRenderDispatcher
public SectionRenderDispatcher(TracingExecutor executor, RenderBuffers renderBuffers, SectionCompiler sectionCompiler, Consumer<SectionRenderDispatcher.RenderSection> onSectionMeshUpdate)
-
-
Method Details
-
setCompiler
-
runTask
private void runTask() -
setCameraPosition
-
getRenderSectionSlice
public @Nullable SectionRenderDispatcher.RenderSectionBufferSlice getRenderSectionSlice(SectionMesh sectionMesh, ChunkSectionLayer layer) -
lock
public void lock() -
unlock
public void unlock() -
uploadTerrainBuffersToGpu
public void uploadTerrainBuffersToGpu() -
schedule
-
clearCompileQueue
public void clearCompileQueue() -
isQueueEmpty
public boolean isQueueEmpty() -
dispose
public void dispose() -
getStats
-
getCompileQueueSize
public int getCompileQueueSize() -
getFreeBufferCount
public int getFreeBufferCount()
-