aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-05-07 17:40:26 +0200
committermakamys <makamys@outlook.com>2021-05-07 17:59:49 +0200
commit47f060337a22042daa65ef9724baf34230e308fa (patch)
treedc218fe1d6d41034a5c04b03f49b13e9aadb0299 /src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java
parentb79ed9cc4f0162b030ce51b880ea1c2bc4a927a5 (diff)
downloadNeodymium-47f060337a22042daa65ef9724baf34230e308fa.tar.gz
Neodymium-47f060337a22042daa65ef9724baf34230e308fa.tar.bz2
Neodymium-47f060337a22042daa65ef9724baf34230e308fa.zip
Add used RAM and mesh count to F3
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java b/src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java
index 190a398..960c48d 100644
--- a/src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java
+++ b/src/main/java/makamys/lodmod/renderer/SimpleChunkMesh.java
@@ -14,6 +14,7 @@ import java.nio.IntBuffer;
import org.lwjgl.BufferUtils;
+import makamys.lodmod.LODMod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
@@ -26,6 +27,9 @@ public class SimpleChunkMesh extends Mesh {
private FloatBuffer vertices;
+ public static int usedRAM;
+ public static int instances;
+
public SimpleChunkMesh(Chunk target) {
int divisions = 4;
quadCount = divisions * divisions * 5;
@@ -74,6 +78,9 @@ public class SimpleChunkMesh extends Mesh {
}
}
vertices.flip();
+
+ usedRAM += buffer.limit();
+ instances++;
}
private void addCube(float x, float y, float z, float sizeX, float sizeZ, float sizeY, IIcon icon, int color) {