From 1300761b7a7eaa07868d16639135849e691360d1 Mon Sep 17 00:00:00 2001 From: makamys Date: Fri, 15 Jul 2022 17:03:39 +0200 Subject: Warn if chunk mesh uses normals and GL lighting is enabled (cc #5) --- src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/makamys/neodymium') diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index f28b390..93d71b3 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -86,10 +86,13 @@ public class ChunkMesh extends Mesh { LOGGER.error("Error in chunk " + tessellatorToString(t) + ": Unsupported draw mode: " + t.drawMode); errors = true; } - if(!t.hasTexture || !t.hasBrightness || !t.hasColor /*|| t.hasNormals*/) { + if(!t.hasTexture || !t.hasBrightness || !t.hasColor) { LOGGER.error("Error in chunk " + tessellatorToString(t) + ": Unsupported tessellator flags"); errors = true; } + if(t.hasNormals && GL11.glIsEnabled(GL11.GL_LIGHTING)) { + LOGGER.warn("Warning in chunk " + tessellatorToString(t) + ": Chunk uses GL lighting, this is not implemented."); + } if(errors) { LOGGER.error("Skipping chunk due to errors."); return; @@ -378,6 +381,6 @@ public class ChunkMesh extends Mesh { } } - + } -- cgit