Undo experimental change to LOD reloading

This commit is contained in:
James Seibel
2024-07-27 20:11:28 -05:00
parent d0dd1f38ff
commit d3d166dd02
2 changed files with 6 additions and 7 deletions
@@ -512,12 +512,8 @@ public class LodQuadTree extends QuadTree<LodRenderSection> implements IDebugRen
QuadNode<LodRenderSection> quadNode = nodeIterator.next();
if (quadNode.value != null)
{
if (quadNode.value.renderingEnabled)
{
quadNode.value.cancelGpuUpload();
quadNode.value.uploadRenderDataToGpuAsync();
}
quadNode.value.close();
quadNode.value = null;
}
}
@@ -313,9 +313,12 @@ public class LodRenderSection implements IDebugRenderable, AutoCloseable
public void cancelGpuUpload()
{
CompletableFuture<Void> future = this.uploadRenderDataToGpuFuture;
this.uploadRenderDataToGpuFuture = null;
if (future != null)
{
future.cancel(true);
// interrupting the future speeds things up, but also causes
// some LODs to never load in properly
future.cancel(false);
}
}