diff options
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 3762dea..e70a12c 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -58,7 +58,7 @@ public class NeoRenderer { public boolean forceRenderFog; public boolean hasIncompatibilities; - private static int MAX_MESHES = 100000; + private static int MAX_MESHES; private int VAO; private int[] shaderProgramsFog = {0, 0}; @@ -364,6 +364,10 @@ public class NeoRenderer { } public boolean init() { + // The average mesh is 60 KB. Let's be safe and assume 8 KB per mesh. + // This means 1 MB of index data per 512 MB of VRAM. + MAX_MESHES = Config.VRAMSize * 128; + reloadShader(); VAO = glGenVertexArrays(); |