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 99ceb1109..42707bd82 100644 --- a/src/main/java/com/seibel/lod/core/render/GLProxy.java +++ b/src/main/java/com/seibel/lod/core/render/GLProxy.java @@ -440,32 +440,4 @@ public class GLProxy instance.workerThread = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat(GLProxy.class.getSimpleName() + "-Worker-Thread").build()); } } - - /** - * If called from a legacy OpenGL context this will - * set the fog end to infinity with a density of 0. - * Effectively removing the fog. - *

- * This only works with Legacy OpenGL because James hasn't - * looking into a way for it to work with Modern OpenGL. - */ - public boolean disableLegacyFog() - { - // make sure this is a legacy OpenGL context - if (minecraftGlCapabilities.glFogf != 0) - { - // glFogf should only have an 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); - return true; - } - return false; - } - - } 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 233737f92..48b3bb574 100644 --- a/src/main/java/com/seibel/lod/core/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/core/render/LodRenderer.java @@ -172,9 +172,8 @@ public class LodRenderer GLProxy glProxy = GLProxy.getInstance(); if (canVanillaFogBeDisabled && CONFIG.client().graphics().fogQuality().getDisableVanillaFog()) - if (!glProxy.disableLegacyFog()) - if (!MC_RENDER.tryDisableVanillaFog()) - canVanillaFogBeDisabled = false; + if (!MC_RENDER.tryDisableVanillaFog()) + canVanillaFogBeDisabled = false; // TODO move the buffer regeneration logic into its own class (probably called in the client api instead) // starting here... diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftRenderWrapper.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftRenderWrapper.java index 6ef47b760..3d4ed437e 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftRenderWrapper.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/minecraft/IMinecraftRenderWrapper.java @@ -121,10 +121,7 @@ public interface IMinecraftRenderWrapper /** @returns -1 if there was an issue getting the lightmap */ public int getLightmapGLFormat(); - /** Try and disable vanilla fog. Return true if successful, or false if not able to. - * If we are still using legacy fog, this method will not be called. */ - public default boolean tryDisableVanillaFog() { - return false; - } + // Try and disable vanilla fog. Return true if successful, or false if not able to. + public boolean tryDisableVanillaFog(); }