use of io.xol.chunkstories.world.chunk.ClientChunk in project chunkstories by Hugobros3.
the class ChunkMeshesRenderer method renderChunksExtras.
@Override
public void renderChunksExtras(RenderingInterface renderingInterface) {
RenderPass currentPass = renderingInterface.getCurrentPass();
List<ChunkRenderCommand> culledChunks = currentPass.name.startsWith("shadow") ? culledChunksShadow : culledChunksNormal;
for (ChunkRenderCommand command : culledChunks) {
ChunkRenderDataHolder holder = ((ClientChunk) command.chunk).getChunkRenderData();
holder.renderExtras(renderingInterface);
}
}
use of io.xol.chunkstories.world.chunk.ClientChunk in project chunkstories by Hugobros3.
the class ChunkRenderDataHolder method requestMeshUpdate.
@Override
public Fence requestMeshUpdate() {
unbakedUpdates.incrementAndGet();
// System.out.println("who did dis");
// Thread.dumpStack();
Task fence;
taskLock.lock();
if (task == null || task.isDone() || task.isCancelled()) {
task = new TaskBakeChunk((ClientChunk) chunk);
chunk.getWorld().getGameContext().tasks().scheduleTask(task);
}
fence = task;
taskLock.unlock();
return fence;
}
Aggregations