diff options
author | makamys <makamys@outlook.com> | 2022-06-08 00:05:48 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-08 00:05:48 +0200 |
commit | e91864da9812b04c0d39c1d0bea3bdfd093ea1ab (patch) | |
tree | 291435037a789fa4a6acf4e04edb347e9a13b9ba /src/main/java/makamys/lodmod/renderer/LODRenderer.java | |
parent | 0b11fe4ec4da63811bdda20ae8b5f28a713cc3f6 (diff) | |
download | Neodymium-e91864da9812b04c0d39c1d0bea3bdfd093ea1ab.tar.gz Neodymium-e91864da9812b04c0d39c1d0bea3bdfd093ea1ab.tar.bz2 Neodymium-e91864da9812b04c0d39c1d0bea3bdfd093ea1ab.zip |
Recover from full VRAM
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/LODRenderer.java')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index 5b8e467..d194fe5 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -55,6 +55,7 @@ import static org.lwjgl.opengl.GL30.*; public class LODRenderer { public boolean hasInited = false; + public boolean destroyPending; private boolean[] wasDown = new boolean[256]; private int renderQuads = 0; @@ -125,7 +126,7 @@ public class LODRenderer { handleKeyboard(); } if(frameCount % 2 == 0) { - mem.runGC(); + mem.runGC(false); } lastGCTime = System.currentTimeMillis(); if(lastSaveTime == -1 || (System.currentTimeMillis() - lastSaveTime) > saveInterval && LODMod.saveMeshes) { @@ -150,6 +151,10 @@ public class LODRenderer { } public void onRenderTickEnd() { + if(destroyPending) { + LODMod.renderer = null; + return; + } if(showMemoryDebugger && mem != null) { GuiHelper.begin(); mem.drawInfo(); |