Removed usage of GL11 in favor of using GlStateManager.

This commit is contained in:
Sebastian Hartte
2016-10-03 00:23:45 +02:00
parent 62f224d77b
commit 2ab1fc0adf
16 changed files with 93 additions and 113 deletions
@@ -19,8 +19,6 @@
package appeng.client.render;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.ItemStack;
@@ -61,12 +59,12 @@ public class StackSizeRenderer
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.disableBlend();
GL11.glPushMatrix();
GL11.glScaled( scaleFactor, scaleFactor, scaleFactor );
GlStateManager.pushMatrix();
GlStateManager.scale( scaleFactor, scaleFactor, scaleFactor );
final int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( craftLabelText ) * scaleFactor ) * inverseScaleFactor );
final int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
fontRenderer.drawStringWithShadow( craftLabelText, X, Y, 16777215 );
GL11.glPopMatrix();
GlStateManager.popMatrix();
GlStateManager.enableLighting();
GlStateManager.enableDepth();
GlStateManager.enableBlend();
@@ -80,12 +78,12 @@ public class StackSizeRenderer
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.disableBlend();
GL11.glPushMatrix();
GL11.glScaled( scaleFactor, scaleFactor, scaleFactor );
GlStateManager.pushMatrix();
GlStateManager.scale( scaleFactor, scaleFactor, scaleFactor );
final int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( stackSize ) * scaleFactor ) * inverseScaleFactor );
final int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
fontRenderer.drawStringWithShadow( stackSize, X, Y, 16777215 );
GL11.glPopMatrix();
GlStateManager.popMatrix();
GlStateManager.enableLighting();
GlStateManager.enableDepth();
GlStateManager.enableBlend();