Replace some GL 1.1 calls with GlStateManager calls

This commit is contained in:
Brady 2018-08-10 23:43:23 -05:00
parent 2d16157d1b
commit 6900fb2ade
No known key found for this signature in database
GPG Key ID: 73A788379A197567
3 changed files with 6 additions and 8 deletions

View File

@ -31,7 +31,6 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import java.util.function.Consumer;
@ -148,7 +147,7 @@ public final class GameEventHandler implements IGameEventListener, Helper {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.color(1.0F, 1.0F, 0.0F, 0.4F);
GL11.glLineWidth(2.0F);
GlStateManager.glLineWidth(2.0F);
GlStateManager.disableTexture2D();
Tessellator tessellator = Tessellator.getInstance();

View File

@ -25,9 +25,9 @@ import java.util.HashMap;
import java.util.Map;
/**
* This serves as a replacement to the old {@code MovementManager}'s
* input overriding capabilities. It is vastly more extensible in the
* inputs that can be overriden.
* An interface with the game's control system allowing the ability to
* force down certain controls, having the same effect as if we were actually
* physically forcing down the assigned key.
*
* @author Brady
* @since 7/31/2018 11:20 PM

View File

@ -29,7 +29,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.util.Collection;
@ -52,7 +51,7 @@ public final class PathRenderer implements Helper {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);
GlStateManager.color(color.getColorComponents(null)[0], color.getColorComponents(null)[1], color.getColorComponents(null)[2], 0.4F);
GL11.glLineWidth(3.0F);
GlStateManager.glLineWidth(3.0F);
GlStateManager.disableTexture2D();
GlStateManager.depthMask(false);
List<BlockPos> positions = path.positions();
@ -99,7 +98,7 @@ public final class PathRenderer implements Helper {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.color(color.getColorComponents(null)[0], color.getColorComponents(null)[1], color.getColorComponents(null)[2], 0.4F);
GL11.glLineWidth(5.0F);
GlStateManager.glLineWidth(5.0F);
GlStateManager.disableTexture2D();
GlStateManager.depthMask(false);
float expand = 0.002F;