aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/makamys/lodmod/renderer/ChunkMesh.java3
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java7
-rw-r--r--src/main/java/makamys/lodmod/renderer/Mesh.java2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/ChunkMesh.java b/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
index 33814a6..562aa49 100644
--- a/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/lodmod/renderer/ChunkMesh.java
@@ -174,6 +174,9 @@ public class ChunkMesh extends Mesh {
return buffer;
}
+ public void update() {
+ }
+
// Java is weird.
public static short readShortAt(DataInputStream in, int offset) {
try {
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 95273c4..c76ea64 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -131,6 +131,7 @@ public class LODRenderer {
if(renderLOD) {
sort();
+ updateMeshes();
initIndexBuffers();
render(alpha);
}
@@ -142,6 +143,12 @@ public class LODRenderer {
private void sort() {
Entity player = Minecraft.getMinecraft().renderViewEntity;
sentMeshes[1].sort(new MeshDistanceComparator(player.posX, player.posY, player.posZ));
+ private void updateMeshes() {
+ for(List<Mesh> list : sentMeshes) {
+ for(Mesh mesh : list) {
+ mesh.update();
+ }
+ }
}
private void initIndexBuffers() {
diff --git a/src/main/java/makamys/lodmod/renderer/Mesh.java b/src/main/java/makamys/lodmod/renderer/Mesh.java
index ca645e8..2367b03 100644
--- a/src/main/java/makamys/lodmod/renderer/Mesh.java
+++ b/src/main/java/makamys/lodmod/renderer/Mesh.java
@@ -35,6 +35,8 @@ public abstract class Mesh {
public void prepareBuffer() {}
public void destroyBuffer() {}
+ public void update() {}
+
public static enum GPUStatus {
UNSENT, SENT, PENDING_DELETE
}