diff --git a/src/main/java/com/seibel/lod/core/render/GLProxy.java b/src/main/java/com/seibel/lod/core/render/GLProxy.java index 2558ef0ca..6a68de5a8 100644 --- a/src/main/java/com/seibel/lod/core/render/GLProxy.java +++ b/src/main/java/com/seibel/lod/core/render/GLProxy.java @@ -53,7 +53,7 @@ import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftWrapper; * https://stackoverflow.com/questions/63509735/massive-performance-loss-with-glmapbuffer

* * @author James Seibel - * @version 11-21-2021 + * @version 11-27-2021 */ public class GLProxy { @@ -376,8 +376,14 @@ public class GLProxy */ public void disableLegacyFog() { + // make sure this is a legacy OpenGL context if (minecraftGlCapabilities.glFogf != 0) { + // glFogf should only have a address if the current OpenGL + // context can call it, and it should only be able to call it in + // legacy OpenGL contexts; since it is disabled in Modern + // OpenGL. + GL11.glFogf(GL11.GL_FOG_START, 0.0f); GL11.glFogf(GL11.GL_FOG_END, Float.MAX_VALUE); GL11.glFogf(GL11.GL_FOG_DENSITY, 0.0f); diff --git a/src/main/java/com/seibel/lod/core/render/LodRenderer.java b/src/main/java/com/seibel/lod/core/render/LodRenderer.java index e0f8c09f4..db5015220 100644 --- a/src/main/java/com/seibel/lod/core/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/core/render/LodRenderer.java @@ -71,12 +71,6 @@ public class LodRenderer private static final IWrapperFactory FACTORY = SingletonHandler.get(IWrapperFactory.class); -// /** -// * this is the light used when rendering the LODs, -// * it should be something different from what is used by Minecraft -// */ -// private static final int LOD_GL_LIGHT_NUMBER = GL15.GL_LIGHT2; - /** * If true the LODs colors will be replaced with * a checkerboard, this can be used for debugging.