aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/makamys/neodymium/Config.java2
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoRenderer.java8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/Config.java b/src/main/java/makamys/neodymium/Config.java
index 3dc2f09..8c93dde 100644
--- a/src/main/java/makamys/neodymium/Config.java
+++ b/src/main/java/makamys/neodymium/Config.java
@@ -37,6 +37,7 @@ public class Config {
public static int debugPrefix;
public static int debugInfoStartY;
public static boolean renderFog;
+ public static boolean wireframe;
// Unused LOD stuff
public static int chunkLoadsPerTick = 64;
@@ -80,6 +81,7 @@ public class Config {
maxMeshesPerFrame = config.getInt("maxMeshesPerFrame", "debug", -1, -1, Integer.MAX_VALUE, "");
debugPrefix = config.getInt("debugPrefix", "debug", Keyboard.KEY_F4, -1, Integer.MAX_VALUE, "This key has to be held down while pressing the debug keybinds. LWJGL keycode. Setting this to 0 will make the keybinds usable without holding anything else down. Setting this to -1 will disable debug keybinds entirely.");
debugInfoStartY = config.getInt("debugInfoStartY", "debug", 80, -1, Integer.MAX_VALUE, "The Y position of the first line of the debug info in the F3 overlay. Set this to -1 to disable showing that info.");
+ wireframe = config.getBoolean("wireframe", "debug", false, "");
if(config.hasChanged()) {
config.save();
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
index 8cc32f5..e5bc886 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
@@ -393,9 +393,13 @@ public class NeoRenderer {
glBindVertexArray(VAO);
GL11.glDisable(GL11.GL_BLEND);
- //GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
+ if(Config.wireframe) {
+ GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
+ }
glMultiDrawArrays(GL_TRIANGLES, piFirst[0], piCount[0]);
- //GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
+ if(Config.wireframe) {
+ GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
+ }
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
//glMultiDrawArrays(GL_TRIANGLES, piFirst[1], piCount[1]);