From 676ecab52ed4c7209620dddf01f1b7043db5a6a9 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Mon, 6 Oct 2014 15:12:12 -0700 Subject: [PATCH] Disable by default the Display Stencil bits. Keep FBO bits. Acording to Mumfery and ChickenBones, it should not be nessasary and should solve the 1/4 main menu issue. Use -Dforge.forceDisplayStencil=true to enable old behavior. --- .../java/net/minecraftforge/client/ForgeHooksClient.java | 7 +++++-- .../java/net/minecraftforge/common/ForgeModContainer.java | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java index 1d549f522..77b6bf0bc 100644 --- a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java +++ b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java @@ -319,10 +319,13 @@ public class ForgeHooksClient { ImageIO.setUseCache(false); //Disable on-disc stream cache should speed up texture pack reloading. PixelFormat format = new PixelFormat().withDepthBits(24); - if (!ForgeModContainer.enableStencilBits || Boolean.parseBoolean(System.getProperty("forge.forceNoStencil", "false"))) + if (!Boolean.parseBoolean(System.getProperty("forge.forceDisplayStencil", "false"))) { + //Creating the display with Stencil bits causes issues on some displays. + //According to ChickenBones, Mumfrey and Pig The only real use is in the FBO. + //So lets default to normal init to fix the issues yet add the bits to the FBO. Display.create(format); - stencilBits = 0; + stencilBits = 8; return; } try diff --git a/src/main/java/net/minecraftforge/common/ForgeModContainer.java b/src/main/java/net/minecraftforge/common/ForgeModContainer.java index 907dc2e26..587e3f54d 100644 --- a/src/main/java/net/minecraftforge/common/ForgeModContainer.java +++ b/src/main/java/net/minecraftforge/common/ForgeModContainer.java @@ -66,7 +66,6 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC public static float zombieBabyChance = 0.05f; public static boolean shouldSortRecipies = true; public static boolean disableVersionCheck = false; - public static boolean enableStencilBits = true; public static int defaultSpawnFuzz = 20; private static Configuration config; @@ -218,12 +217,6 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC zombieBabyChance = (float) prop.getDouble(0.05); propOrder.add(prop.getName()); - prop = config.get(Configuration.CATEGORY_GENERAL, "enableStencilBits", true); - prop.comment = "Set to false to attempt to allocate 8 stencil bits when starting the GL display context."; - prop.setLanguageKey("forge.configgui.stencilbits").setRequiresWorldRestart(true); - enableStencilBits = prop.getBoolean(true); - propOrder.add(prop.getName()); - prop = config.get(Configuration.CATEGORY_GENERAL, "defaultSpawnFuzz", 20, "The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld.", 1, Integer.MAX_VALUE);