Skip to content

Commit

Permalink
Merge pull request #6 from xJon/master
Browse files Browse the repository at this point in the history
Fix GL state leak
  • Loading branch information
IcarussOne authored Sep 1, 2024
2 parents eebfd6f + e182172 commit b94baa9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public class HudManager {

public void renderHuds(Minecraft mc, float renderTickTime, EntityPlayer player, long time) {
if (!TWConfig.general_settings.I_HUD) return;

GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_TRANSFORM_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_TEXTURE_BIT | GL11.GL_ACCUM_BUFFER_BIT);
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
GL11.glClear(GL11.GL_ACCUM);
GL11.glMatrixMode(GL11.GL_PROJECTION);
Expand Down Expand Up @@ -89,6 +90,7 @@ public void renderHuds(Minecraft mc, float renderTickTime, EntityPlayer player,
}

GL11.glDisable(GL11.GL_BLEND);
GL11.glPopAttrib();
GL11.glPopMatrix();
}

Expand Down

0 comments on commit b94baa9

Please sign in to comment.