Skip to content

Commit

Permalink
Actually save GL state
Browse files Browse the repository at this point in the history
  • Loading branch information
xchgeax committed Aug 20, 2022
1 parent 3ef95fc commit 913fd81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void renderTileEntityAt(TileEntity tileEntity, double xpos, double ypos,
// the following is how it was set, enabling lighting makes it look better with smooth lighting, mostly... bottom labels are abit dark
// will need to actually properly calculate lighting, but for now this looks better on smooth lit barrels than the full bright it was before
// found another bug: disabling lighting causes grass to look white, and a few other quirks, putting this on hold for the momment
GL11.glPushAttrib(GL11.GL_BLEND | GL11.GL_LIGHTING);
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected void renderTextOnBlock(String renderString, ForgeDirection side, Forge
protected void renderStackOnBlock(ItemStack stack, ForgeDirection side, ForgeDirection orientation, Coordinates barrelPos, float size, double posx, double posy){
if (stack == null) { return; }

GL11.glPushAttrib(GL11.GL_ALPHA_TEST | GL11.GL_LIGHTING);
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
GL11.glPushMatrix();

this.alignRendering(side, orientation, barrelPos);
Expand All @@ -108,7 +108,7 @@ protected void renderStackOnBlock(ItemStack stack, ForgeDirection side, ForgeDir
protected void renderIconOnBlock(IIcon icon, int sheet, ForgeDirection side, ForgeDirection orientation, Coordinates barrelPos, float size, double posx, double posy, double zdepth){
if (icon == null) { return ; }

GL11.glPushAttrib(GL11.GL_ALPHA_TEST | GL11.GL_LIGHTING);
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
GL11.glPushMatrix();

this.alignRendering(side, orientation, barrelPos);
Expand Down

0 comments on commit 913fd81

Please sign in to comment.