Possibly fix some weirdness on screen resize and with MiB
This commit is contained in:
@@ -82,6 +82,7 @@ public class ChunkBoundRenderer {
|
||||
this.depthBuffer.free();
|
||||
this.depthBuffer = new GlTexture().store(GL_DEPTH_COMPONENT24, 1, viewport.width, viewport.height);
|
||||
this.frameBuffer.bind(GL_DEPTH_ATTACHMENT, this.depthBuffer).verify();
|
||||
glClearNamedFramebufferfv(this.frameBuffer.id, GL_DEPTH, 0, new float[]{0});
|
||||
}
|
||||
|
||||
if (this.chunk2idx.isEmpty() && this.addQueue.isEmpty()) return;
|
||||
|
||||
@@ -94,7 +94,14 @@ public class MixinRenderSectionManager {
|
||||
if (system == null) {
|
||||
return true;
|
||||
}
|
||||
long pos = ChunkSectionPos.asLong(instance.getChunkX(), instance.getChunkY(), instance.getChunkZ());
|
||||
int x = instance.getChunkX(), y = instance.getChunkY(), z = instance.getChunkZ();
|
||||
//Do some very cheeky stuff for MiB
|
||||
if (false) {
|
||||
int sector = (x+512)>>10;
|
||||
x-=sector<<10;
|
||||
y+=16+(256-32-sector*30);
|
||||
}
|
||||
long pos = ChunkSectionPos.asLong(x,y,z);
|
||||
if (wasBuilt) {//Remove
|
||||
system.chunkBoundRenderer.removeSection(pos);
|
||||
} else {//Add
|
||||
|
||||
Reference in New Issue
Block a user