aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/ChunkMesh.java4
-rw-r--r--src/main/java/makamys/lodmod/renderer/Mesh.java1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/ChunkMesh.java b/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
index 0bf4b60..f07a908 100644
--- a/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
@@ -250,6 +250,10 @@ public class ChunkMesh extends Mesh {
usedRAM -= buffer.limit();
instances--;
buffer = null;
+
+ if(gpuStatus == Mesh.GPUStatus.SENT) {
+ gpuStatus = Mesh.GPUStatus.PENDING_DELETE;
+ }
}
}
diff --git a/src/main/java/makamys/lodmod/renderer/Mesh.java b/src/main/java/makamys/lodmod/renderer/Mesh.java
index 9d41960..fb1b8f1 100644
--- a/src/main/java/makamys/lodmod/renderer/Mesh.java
+++ b/src/main/java/makamys/lodmod/renderer/Mesh.java
@@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTBase;
public abstract class Mesh {
+ /** Can be null, unless gpuStatus is SENT */
public ByteBuffer buffer;
public int quadCount;
public boolean visible;