diff options
author | syeyoung <cyong06@naver.com> | 2021-01-15 23:18:13 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-15 23:18:13 +0900 |
commit | 2f31ee747d693ed444334c84b4e2b112ef142531 (patch) | |
tree | 6d45305ca7547710081bf866970d6a320358d4b0 /src/main/java/kr/syeyoung/dungeonsguide/config | |
parent | 58040f039287bcbfcfb6a5bd06172820f0fa16cf (diff) | |
download | Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.tar.gz Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.tar.bz2 Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.zip |
facking glstatemanager
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/config')
5 files changed, 41 insertions, 28 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java index 80879a9d..a9d81420 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java @@ -46,16 +46,18 @@ public class GuiConfig extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); + GlStateManager.pushAttrib(); GlStateManager.disableLighting(); - GlStateManager.disableFog(); + GlStateManager.disableFog();GL11.glDisable(GL11.GL_FOG); GlStateManager.color(1,1,1,1); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(false); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); mainPanel.render0(scaledResolution, new Point(0,0), new Rectangle(0,0,scaledResolution.getScaledWidth(),scaledResolution.getScaledHeight()), mouseX, mouseY, mouseX, mouseY, partialTicks); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(true); - GL11.glPopMatrix(); + GlStateManager.enableDepth(); + GlStateManager.depthMask(true); + GlStateManager.popAttrib(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java index fd491705..d7be3325 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java @@ -57,16 +57,20 @@ public class GuiGuiLocationConfig extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); + GlStateManager.pushAttrib(); GlStateManager.disableLighting(); - GlStateManager.disableFog(); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); + GlStateManager.disableFog();GL11.glDisable(GL11.GL_FOG); GlStateManager.color(1,1,1,1); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(false); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); mainPanel.render0(scaledResolution, new Point(0,0), new Rectangle(0,0,scaledResolution.getScaledWidth(),scaledResolution.getScaledHeight()), mouseX, mouseY, mouseX, mouseY, partialTicks); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(true); - GL11.glPopMatrix(); + GlStateManager.enableDepth(); + GlStateManager.depthMask(true); + GlStateManager.popAttrib(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java index d99d2cbb..fa80758c 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java @@ -60,12 +60,13 @@ public class GuiParameterConfig extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); + GlStateManager.pushAttrib(); GlStateManager.disableLighting(); - GlStateManager.disableFog(); + GlStateManager.disableFog();GL11.glDisable(GL11.GL_FOG); GlStateManager.color(1,1,1,1); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(false); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); int heights = 0; within = null; for (MPanel panel:mainPanel.getChildComponents()) { @@ -75,8 +76,8 @@ public class GuiParameterConfig extends GuiScreen { if (panel.getBounds().contains(mouseX - mainPanel.getBounds().x, mouseY - mainPanel.getBounds().y)) within = panel; } mainPanel.render0(scaledResolution, new Point(0,0), new Rectangle(0,0,scaledResolution.getScaledWidth(),scaledResolution.getScaledHeight()), mouseX, mouseY, mouseX, mouseY, partialTicks); - GL11.glPopMatrix(); - GL11.glPushMatrix(); + GlStateManager.popMatrix(); + GlStateManager.pushMatrix(); GlStateManager.color(1,1,1,1); if (within instanceof MParameter) { FeatureParameter feature = ((MParameter) within).getParameter(); @@ -84,9 +85,10 @@ public class GuiParameterConfig extends GuiScreen { drawHoveringText(new ArrayList<String>(Arrays.asList(feature.getDescription().split("\n"))), mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); GlStateManager.popAttrib(); } - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(true); - GL11.glPopMatrix(); + GlStateManager.enableDepth(); + GlStateManager.depthMask(true); + GlStateManager.popAttrib(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java index 6e8b1636..e3a51d1f 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java @@ -119,12 +119,16 @@ public class GuiParameterValueEdit extends GuiScreen { public void drawScreen(int mouseX, int mouseY, float partialTicks) { try { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); + GlStateManager.pushAttrib(); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); GlStateManager.disableLighting(); - GlStateManager.disableFog(); + GlStateManager.disableFog();GL11.glDisable(GL11.GL_FOG); GlStateManager.color(1,1,1,1); mainPanel.render0(scaledResolution, new Point(0, 0), new Rectangle(0, 0, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight()), mouseX, mouseY, mouseX, mouseY, partialTicks); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); + GlStateManager.popAttrib(); } catch (Throwable e) { e.printStackTrace(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java index 8fa6d371..5ceecc23 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java @@ -3,6 +3,7 @@ package kr.syeyoung.dungeonsguide.config.guiconfig; import kr.syeyoung.dungeonsguide.features.GuiFeature; import kr.syeyoung.dungeonsguide.roomedit.MPanel; import net.minecraft.client.gui.Gui; +import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.opengl.GL11; import org.w3c.dom.css.Rect; @@ -21,9 +22,9 @@ public class PanelDelegate extends MPanel { @Override public void render(int absMousex, int absMousey, int relMouseX, int relMouseY, float partialTicks, Rectangle scissor) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); guiFeature.drawDemo(partialTicks); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); Gui.drawRect(0,0, 3, 3, 0xFFBBBBBB); Gui.drawRect(0, getBounds().height - 3, 3, getBounds().height, 0xFFBBBBBB); |