public class ChunkRenderDispatcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ChunkRenderDispatcher.ChunkRender |
(package private) static class |
ChunkRenderDispatcher.ChunkTaskResult |
static class |
ChunkRenderDispatcher.CompiledChunk |
Modifier and Type | Field and Description |
---|---|
private int |
countFreeBuilders |
private int |
countRenderTasks |
private DelegatedTaskExecutor<java.lang.Runnable> |
delegatedTaskExecutor |
private java.util.concurrent.Executor |
executor |
private RegionRenderCacheBuilder |
fixedBuilder |
private java.util.Queue<RegionRenderCacheBuilder> |
freeBuilders |
private static org.apache.logging.log4j.Logger |
LOGGER |
private Vec3d |
renderPosition |
private java.util.PriorityQueue<ChunkRenderDispatcher.ChunkRender.ChunkRenderTask> |
renderTasks |
private java.util.Queue<java.lang.Runnable> |
uploadTasks |
private World |
world |
private WorldRenderer |
worldRenderer |
Constructor and Description |
---|
ChunkRenderDispatcher(World worldIn,
WorldRenderer worldRendererIn,
java.util.concurrent.Executor executorIn,
boolean java64bit,
RegionRenderCacheBuilder fixedBuilderIn) |
ChunkRenderDispatcher(World worldIn,
WorldRenderer worldRendererIn,
java.util.concurrent.Executor executorIn,
boolean java64bit,
RegionRenderCacheBuilder fixedBuilderIn,
int countRenderBuilders) |
Modifier and Type | Method and Description |
---|---|
private void |
clearChunkUpdates() |
java.lang.String |
getDebugInfo() |
Vec3d |
getRenderPosition() |
boolean |
hasNoChunkUpdates() |
void |
rebuildChunk(ChunkRenderDispatcher.ChunkRender chunkRenderIn) |
boolean |
runChunkUploads() |
private void |
runTask() |
void |
schedule(ChunkRenderDispatcher.ChunkRender.ChunkRenderTask renderTaskIn) |
void |
setRenderPosition(Vec3d posIn) |
void |
setWorld(World worldIn) |
void |
stopChunkUpdates() |
void |
stopWorkerThreads() |
java.util.concurrent.CompletableFuture<java.lang.Void> |
uploadChunkLayer(BufferBuilder bufferBuilderIn,
VertexBuffer vertexBufferIn) |
private java.util.concurrent.CompletableFuture<java.lang.Void> |
uploadChunkLayerRaw(BufferBuilder bufferBuilderIn,
VertexBuffer vertexBufferIn) |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.PriorityQueue<ChunkRenderDispatcher.ChunkRender.ChunkRenderTask> renderTasks
private final java.util.Queue<RegionRenderCacheBuilder> freeBuilders
private final java.util.Queue<java.lang.Runnable> uploadTasks
private volatile int countRenderTasks
private volatile int countFreeBuilders
private final RegionRenderCacheBuilder fixedBuilder
private final DelegatedTaskExecutor<java.lang.Runnable> delegatedTaskExecutor
private final java.util.concurrent.Executor executor
private World world
private final WorldRenderer worldRenderer
private Vec3d renderPosition
public ChunkRenderDispatcher(World worldIn, WorldRenderer worldRendererIn, java.util.concurrent.Executor executorIn, boolean java64bit, RegionRenderCacheBuilder fixedBuilderIn)
public ChunkRenderDispatcher(World worldIn, WorldRenderer worldRendererIn, java.util.concurrent.Executor executorIn, boolean java64bit, RegionRenderCacheBuilder fixedBuilderIn, int countRenderBuilders)
public void setWorld(World worldIn)
private void runTask()
public java.lang.String getDebugInfo()
public void setRenderPosition(Vec3d posIn)
public Vec3d getRenderPosition()
public boolean runChunkUploads()
public void rebuildChunk(ChunkRenderDispatcher.ChunkRender chunkRenderIn)
public void stopChunkUpdates()
public void schedule(ChunkRenderDispatcher.ChunkRender.ChunkRenderTask renderTaskIn)
public java.util.concurrent.CompletableFuture<java.lang.Void> uploadChunkLayer(BufferBuilder bufferBuilderIn, VertexBuffer vertexBufferIn)
private java.util.concurrent.CompletableFuture<java.lang.Void> uploadChunkLayerRaw(BufferBuilder bufferBuilderIn, VertexBuffer vertexBufferIn)
private void clearChunkUpdates()
public boolean hasNoChunkUpdates()
public void stopWorkerThreads()