mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 15:25:08 +01:00
clean: remove GlStateManager calls
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
|
||||
package eu.midnightdust.midnightcontrols.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.opengl.GlStateManager;
|
||||
import com.mojang.blaze3d.platform.GLX;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import eu.midnightdust.midnightcontrols.ControlsMode;
|
||||
import eu.midnightdust.midnightcontrols.client.enums.ControllerType;
|
||||
@@ -171,8 +169,6 @@ public class MidnightControlsRenderer {
|
||||
case GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER + 100, GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER + 200 -> buttonOffset = 10 * 15;
|
||||
}
|
||||
|
||||
GlStateManager._disableDepthTest();
|
||||
|
||||
int assetSize = axis || (button >= 15 && button <= 18) ? AXIS_SIZE : BUTTON_SIZE;
|
||||
|
||||
RenderSystem.setShaderColor(1.f, second ? 0.f : 1.f, 1.f, 1.f);
|
||||
@@ -181,7 +177,6 @@ public class MidnightControlsRenderer {
|
||||
(float) buttonOffset, (float) (controllerType * assetSize),
|
||||
assetSize, assetSize,
|
||||
256, 256);
|
||||
GlStateManager._enableDepthTest();
|
||||
|
||||
return ICON_SIZE;
|
||||
}
|
||||
|
||||
@@ -528,13 +528,10 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
||||
float g = (float)(color.getGreen()) / 255.0F;
|
||||
float b = (float)(color.getBlue()) / 255.0F;
|
||||
float t = (float)(transparency) / 255.0F;
|
||||
GlStateManager._enableBlend();
|
||||
//GlStateManager._defaultBlendFunc();
|
||||
vertexConsumer.vertex((float)x1, (float)y2, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x2, (float)y2, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x2, (float)y1, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x1, (float)y1, 0.0F).color(r, g, b, t);
|
||||
GlStateManager._disableBlend();
|
||||
context.draw();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user