Removed usage of GL11 in favor of using GlStateManager.
This commit is contained in:
parent
62f224d77b
commit
2ab1fc0adf
|
@ -24,9 +24,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -252,7 +251,7 @@ public class ClientHelper extends ServerHelper
|
|||
final float r = 0xff & ( col.mediumVariant >> 16 );
|
||||
final float g = 0xff & ( col.mediumVariant >> 8 );
|
||||
final float b = 0xff & ( col.mediumVariant );
|
||||
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
|
||||
GlStateManager.color( r / 255.0f, g / 255.0f, b / 255.0f );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
if( this.getScrollBar() != null )
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
this.drawBG( ox, oy, x, y );
|
||||
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
|
@ -267,10 +267,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||
GlStateManager.enableBlend();
|
||||
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18, 18 );
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -669,7 +669,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
this.itemRender.zLevel = 100.0F;
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GlStateManager.enableDepth();
|
||||
this.itemRender.renderItemAndEffectIntoGUI( is, x, y );
|
||||
GlStateManager.disableDepth();
|
||||
|
||||
this.itemRender.zLevel = 0.0F;
|
||||
this.zLevel = 0.0F;
|
||||
|
@ -740,17 +742,16 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
this.bindTexture( "guis/states.png" );
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
try
|
||||
{
|
||||
final int uv_y = (int) Math.floor( aes.getIcon() / 16 );
|
||||
final int uv_x = aes.getIcon() - uv_y * 16;
|
||||
|
||||
GL11.glEnable( GL11.GL_BLEND );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL11.GL_TEXTURE_2D );
|
||||
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.blendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
final float par1 = aes.xDisplayPosition;
|
||||
final float par2 = aes.yDisplayPosition;
|
||||
final float par3 = uv_x * 16;
|
||||
|
@ -770,11 +771,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
vb.pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
||||
vb.pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
||||
tessellator.draw();
|
||||
|
||||
}
|
||||
catch( final Exception err )
|
||||
{
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -802,9 +803,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
this.zLevel = 100.0F;
|
||||
this.itemRender.zLevel = 100.0F;
|
||||
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GlStateManager.disableLighting();
|
||||
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
GlStateManager.enableLighting();
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
this.itemRender.zLevel = 0.0F;
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.util.concurrent.TimeUnit;
|
|||
import com.google.common.base.Joiner;
|
||||
|
||||
import org.apache.commons.lang3.time.DurationFormatUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
|
|
@ -31,8 +31,7 @@ import java.util.WeakHashMap;
|
|||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -175,7 +174,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||
{
|
||||
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
|
||||
GL11.glColor4f( 1, 1, 1, 1 );
|
||||
GlStateManager.color( 1, 1, 1, 1 );
|
||||
final int width = inv.getInventory().getSizeInventory() * 18;
|
||||
this.drawTexturedModalRect( offsetX + 7, offsetY + offset, 7, 139, width, 18 );
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
|
@ -65,7 +64,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
|||
{
|
||||
final int i1 = this.cvc.getCurrentProgress();
|
||||
this.bindTexture( "guis/vibchamber.png" );
|
||||
GL11.glColor3f( 1, 1, 1 );
|
||||
GlStateManager.color( 1, 1, 1 );
|
||||
final int l = -15;
|
||||
final int k = 25;
|
||||
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
|
||||
|
|
|
@ -23,10 +23,9 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
|
@ -195,17 +194,17 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
this.width = 8;
|
||||
this.height = 8;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef( this.xPosition, this.yPosition, 0.0F );
|
||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate( this.xPosition, this.yPosition, 0.0F );
|
||||
GlStateManager.scale( 0.5f, 0.5f, 0.5f );
|
||||
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
GlStateManager.color( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
|
@ -218,17 +217,17 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
this.drawTexturedModalRect( 0, 0, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
GlStateManager.color( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
|
@ -242,7 +241,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
}
|
||||
}
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
|
||||
private int getIconIndex()
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class GuiScrollbar implements IScrollSource
|
|||
public void draw( final AEBaseGui g )
|
||||
{
|
||||
g.bindTexture( "minecraft", "gui/container/creative_inventory/tabs.png" );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if( this.getRange() == 0 )
|
||||
{
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -77,7 +75,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
|||
{
|
||||
if( this.visible )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height;
|
||||
|
||||
|
|
|
@ -21,10 +21,9 @@ package appeng.client.gui.widgets;
|
|||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
|
@ -65,7 +64,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
|||
{
|
||||
final int iconIndex = this.getIconIndex();
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -60,52 +61,52 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
if( now - this.cycle > 2000 )
|
||||
{
|
||||
this.cycle = now;
|
||||
GL11.glNewList( this.dspList, GL11.GL_COMPILE );
|
||||
GlStateManager.glNewList( this.dspList, GL11.GL_COMPILE );
|
||||
this.renderTwinkles();
|
||||
GL11.glEndList();
|
||||
GlStateManager.glEndList();
|
||||
}
|
||||
|
||||
float fade = now - this.cycle;
|
||||
fade /= 1000;
|
||||
fade = 0.15f * ( 1.0f - Math.abs( ( fade - 1.0f ) * ( fade - 1.0f ) ) );
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
GlStateManager.pushAttrib();
|
||||
|
||||
GL11.glDisable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glDisable( GL11.GL_BLEND );
|
||||
GL11.glDepthMask( false );
|
||||
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
GlStateManager.disableFog();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.depthMask( false );
|
||||
GlStateManager.color( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
if( i == 1 )
|
||||
{
|
||||
GL11.glRotatef( 90.0F, 1.0F, 0.0F, 0.0F );
|
||||
GlStateManager.rotate( 90.0F, 1.0F, 0.0F, 0.0F );
|
||||
}
|
||||
|
||||
if( i == 2 )
|
||||
{
|
||||
GL11.glRotatef( -90.0F, 1.0F, 0.0F, 0.0F );
|
||||
GlStateManager.rotate( -90.0F, 1.0F, 0.0F, 0.0F );
|
||||
}
|
||||
|
||||
if( i == 3 )
|
||||
{
|
||||
GL11.glRotatef( 180.0F, 1.0F, 0.0F, 0.0F );
|
||||
GlStateManager.rotate( 180.0F, 1.0F, 0.0F, 0.0F );
|
||||
}
|
||||
|
||||
if( i == 4 )
|
||||
{
|
||||
GL11.glRotatef( 90.0F, 0.0F, 0.0F, 1.0F );
|
||||
GlStateManager.rotate( 90.0F, 0.0F, 0.0F, 1.0F );
|
||||
}
|
||||
|
||||
if( i == 5 )
|
||||
{
|
||||
GL11.glRotatef( -90.0F, 0.0F, 0.0F, 1.0F );
|
||||
GlStateManager.rotate( -90.0F, 0.0F, 0.0F, 1.0F );
|
||||
}
|
||||
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
|
@ -114,32 +115,29 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GL11.glDepthMask( true );
|
||||
GlStateManager.depthMask( true );
|
||||
|
||||
if( fade > 0.0f )
|
||||
{
|
||||
GL11.glDisable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glEnable( GL11.GL_BLEND );
|
||||
GL11.glDepthMask( false );
|
||||
GL11.glEnable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glDisable( GL11.GL_TEXTURE_2D );
|
||||
GlStateManager.disableFog();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.depthMask( false );
|
||||
OpenGlHelper.glBlendFunc( 770, 771, 1, 0 );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDepthMask( false );
|
||||
GlStateManager.depthMask( false );
|
||||
|
||||
GL11.glColor4f( fade, fade, fade, 1.0f );
|
||||
GL11.glCallList( this.dspList );
|
||||
GlStateManager.color( fade, fade, fade, 1.0f );
|
||||
GlStateManager.callList( this.dspList );
|
||||
}
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GlStateManager.popAttrib();
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
|
||||
private void renderTwinkles()
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
package appeng.client.render;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -48,7 +46,7 @@ public class TesrRenderHelper
|
|||
*/
|
||||
public static void moveToFace( EnumFacing face )
|
||||
{
|
||||
GL11.glTranslated( face.getFrontOffsetX() * 0.50, face.getFrontOffsetY() * 0.50, face.getFrontOffsetZ() * 0.50 );
|
||||
GlStateManager.translate( face.getFrontOffsetX() * 0.50, face.getFrontOffsetY() * 0.50, face.getFrontOffsetZ() * 0.50 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,34 +59,34 @@ public class TesrRenderHelper
|
|||
switch( face )
|
||||
{
|
||||
case UP:
|
||||
GL11.glScalef( 1.0f, -1.0f, 1.0f );
|
||||
GL11.glRotatef( 90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GL11.glRotatef( spin * 90.0F, 0, 0, 1 );
|
||||
GlStateManager.scale( 1.0f, -1.0f, 1.0f );
|
||||
GlStateManager.rotate( 90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GlStateManager.rotate( spin * 90.0F, 0, 0, 1 );
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
GL11.glScalef( 1.0f, -1.0f, 1.0f );
|
||||
GL11.glRotatef( -90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GL11.glRotatef( spin * -90.0F, 0, 0, 1 );
|
||||
GlStateManager.scale( 1.0f, -1.0f, 1.0f );
|
||||
GlStateManager.rotate( -90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GlStateManager.rotate( spin * -90.0F, 0, 0, 1 );
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
GL11.glScalef( -1.0f, -1.0f, -1.0f );
|
||||
GL11.glRotatef( -90.0f, 0.0f, 1.0f, 0.0f );
|
||||
GlStateManager.scale( -1.0f, -1.0f, -1.0f );
|
||||
GlStateManager.rotate( -90.0f, 0.0f, 1.0f, 0.0f );
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
GL11.glScalef( -1.0f, -1.0f, -1.0f );
|
||||
GL11.glRotatef( 90.0f, 0.0f, 1.0f, 0.0f );
|
||||
GlStateManager.scale( -1.0f, -1.0f, -1.0f );
|
||||
GlStateManager.rotate( 90.0f, 0.0f, 1.0f, 0.0f );
|
||||
break;
|
||||
|
||||
case NORTH:
|
||||
GL11.glScalef( -1.0f, -1.0f, -1.0f );
|
||||
GlStateManager.scale( -1.0f, -1.0f, -1.0f );
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
GL11.glScalef( -1.0f, -1.0f, -1.0f );
|
||||
GL11.glRotatef( 180.0f, 0.0f, 1.0f, 0.0f );
|
||||
GlStateManager.scale( -1.0f, -1.0f, -1.0f );
|
||||
GlStateManager.rotate( 180.0f, 0.0f, 1.0f, 0.0f );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -137,9 +135,9 @@ public class TesrRenderHelper
|
|||
// Render the item count
|
||||
final FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
|
||||
final int width = fr.getStringWidth( renderedStackSize );
|
||||
GL11.glTranslatef( 0.0f, spacing, 0 );
|
||||
GL11.glScalef( 1.0f / 62.0f, 1.0f / 62.0f, 1.0f / 62.0f );
|
||||
GL11.glTranslatef( -0.5f * width, 0.0f, 0.5f );
|
||||
GlStateManager.translate( 0.0f, spacing, 0 );
|
||||
GlStateManager.scale( 1.0f / 62.0f, 1.0f / 62.0f, 1.0f / 62.0f );
|
||||
GlStateManager.translate( -0.5f * width, 0.0f, 0.5f );
|
||||
fr.drawString( renderedStackSize, 0, 0, 0 );
|
||||
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -53,7 +51,7 @@ public class CraftingMonitorTESR extends TileEntitySpecialRenderer<TileCraftingM
|
|||
if( jobProgress != null )
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glTranslated( x + 0.5, y + 0.5, z + 0.5 );
|
||||
GlStateManager.translate( x + 0.5, y + 0.5, z + 0.5 );
|
||||
|
||||
TesrRenderHelper.moveToFace( facing );
|
||||
TesrRenderHelper.rotateToFace( facing, (byte) 0 );
|
||||
|
|
|
@ -19,9 +19,8 @@
|
|||
package appeng.entity;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -48,15 +47,15 @@ public class RenderFloatingItem extends RenderEntityItem
|
|||
final EntityFloatingItem efi = (EntityFloatingItem) entityItem;
|
||||
if( efi.getProgress() > 0.0 )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
if( !( efi.getEntityItem().getItem() instanceof ItemBlock ) )
|
||||
{
|
||||
GL11.glTranslatef( 0, -0.15f, 0 );
|
||||
GlStateManager.translate( 0, -0.15f, 0 );
|
||||
}
|
||||
|
||||
super.doRender( efi, x, y, z, yaw, partialTick );
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
package appeng.entity;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -74,10 +72,10 @@ public class RenderTinyTNTPrimed extends Render
|
|||
f2 *= f2;
|
||||
f2 *= f2;
|
||||
final float f3 = 1.0F + f2 * 0.3F;
|
||||
GL11.glScalef( f3, f3, f3 );
|
||||
GlStateManager.scale( f3, f3, f3 );
|
||||
}
|
||||
|
||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||
GlStateManager.scale( 0.5f, 0.5f, 0.5f );
|
||||
f2 = ( 1.0F - ( tnt.getFuse() - life + 1.0F ) / 100.0F ) * 0.8F;
|
||||
this.bindEntityTexture( tnt );
|
||||
GlStateManager.translate( -0.5F, -0.5F, 0.5F );
|
||||
|
|
|
@ -22,8 +22,6 @@ package appeng.parts.reporting;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -252,7 +250,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
|||
}
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glTranslated( x + 0.5, y + 0.5, z + 0.5 );
|
||||
GlStateManager.translate( x + 0.5, y + 0.5, z + 0.5 );
|
||||
|
||||
EnumFacing facing = this.getSide().getFacing();
|
||||
|
||||
|
|
Loading…
Reference in New Issue