h
This commit is contained in:
@@ -64,35 +64,40 @@ public class VoxyRenderSystem {
|
|||||||
//Keep the world loaded, NOTE: this is done FIRST, to keep and ensure that even if the rest of loading takes more
|
//Keep the world loaded, NOTE: this is done FIRST, to keep and ensure that even if the rest of loading takes more
|
||||||
// than timeout, we keep the world acquired
|
// than timeout, we keep the world acquired
|
||||||
world.acquireRef();
|
world.acquireRef();
|
||||||
|
try {
|
||||||
|
//wait for opengl to be finished, this should hopefully ensure all memory allocations are free
|
||||||
|
glFinish();
|
||||||
|
glFinish();
|
||||||
|
|
||||||
//wait for opengl to be finished, this should hopefully ensure all memory allocations are free
|
//Trigger the shared index buffer loading
|
||||||
glFinish();glFinish();
|
SharedIndexBuffer.INSTANCE.id();
|
||||||
|
Capabilities.init();//Ensure clinit is called
|
||||||
|
|
||||||
//Trigger the shared index buffer loading
|
this.worldIn = world;
|
||||||
SharedIndexBuffer.INSTANCE.id();
|
this.renderer = new RenderService(world, threadPool);
|
||||||
Capabilities.init();//Ensure clinit is called
|
this.postProcessing = new PostProcessing();
|
||||||
|
int minSec = MinecraftClient.getInstance().world.getBottomSectionCoord() >> 5;
|
||||||
|
int maxSec = (MinecraftClient.getInstance().world.getTopSectionCoord() - 1) >> 5;
|
||||||
|
|
||||||
this.worldIn = world;
|
//Do some very cheeky stuff for MiB
|
||||||
this.renderer = new RenderService(world, threadPool);
|
if (false) {
|
||||||
this.postProcessing = new PostProcessing();
|
minSec = -8;
|
||||||
int minSec = MinecraftClient.getInstance().world.getBottomSectionCoord()>>5;
|
maxSec = 7;
|
||||||
int maxSec = (MinecraftClient.getInstance().world.getTopSectionCoord()-1)>>5;
|
}
|
||||||
|
|
||||||
//Do some very cheeky stuff for MiB
|
this.renderDistanceTracker = new RenderDistanceTracker(20,
|
||||||
if (false) {
|
minSec,
|
||||||
minSec = -8;
|
maxSec,
|
||||||
maxSec = 7;
|
this.renderer::addTopLevelNode,
|
||||||
|
this.renderer::removeTopLevelNode);
|
||||||
|
|
||||||
|
this.renderDistanceTracker.setRenderDistance(VoxyConfig.CONFIG.sectionRenderDistance);
|
||||||
|
|
||||||
|
this.chunkBoundRenderer = new ChunkBoundRenderer();
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
world.releaseRef();//If something goes wrong, we must release the world first
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.renderDistanceTracker = new RenderDistanceTracker(20,
|
|
||||||
minSec,
|
|
||||||
maxSec,
|
|
||||||
this.renderer::addTopLevelNode,
|
|
||||||
this.renderer::removeTopLevelNode);
|
|
||||||
|
|
||||||
this.renderDistanceTracker.setRenderDistance(VoxyConfig.CONFIG.sectionRenderDistance);
|
|
||||||
|
|
||||||
this.chunkBoundRenderer = new ChunkBoundRenderer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRenderDistance(int renderDistance) {
|
public void setRenderDistance(int renderDistance) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, Q>, J extends Vi
|
|||||||
|
|
||||||
geometryCapacity = Math.min(geometryCapacity, limit);
|
geometryCapacity = Math.min(geometryCapacity, limit);
|
||||||
}
|
}
|
||||||
//geometryCapacity = 1<<24;
|
//geometryCapacity = 1<<28;
|
||||||
//geometryCapacity = 1<<30;//1GB test
|
//geometryCapacity = 1<<30;//1GB test
|
||||||
return geometryCapacity;
|
return geometryCapacity;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user