GlStateManager -> RenderSystem.

This commit is contained in:
Florian Nücke
2021-08-05 01:57:03 +02:00
parent a4042b1911
commit 87712f4c82
2 changed files with 8 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
package li.cil.oc2.client.renderer.tileentity;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import li.cil.oc2.api.API;
import li.cil.oc2.client.renderer.CustomRenderType;
@@ -134,9 +134,9 @@ public final class ComputerTileEntityRenderer extends TileEntityRenderer<Compute
stack.scale(scale, scale, 1f);
// TODO Make terminal renderer use buffer+rendertype.
GlStateManager._enableBlend();
GlStateManager._enableDepthTest();
GlStateManager._depthMask(false);
RenderSystem.enableBlend();
RenderSystem.enableDepthTest();
RenderSystem.depthMask(false);
terminal.render(stack);
stack.popPose();

View File

@@ -1,7 +1,6 @@
package li.cil.oc2.common.vm;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import it.unimi.dsi.fastutil.bytes.ByteArrayFIFOQueue;
import li.cil.ceres.api.Serialized;
@@ -552,7 +551,7 @@ public final class Terminal {
///////////////////////////////////////////////////////////////
private void renderBuffer() {
GlStateManager._depthMask(false);
RenderSystem.depthMask(false);
Minecraft.getInstance().getTextureManager().bind(LOCATION_FONT_TEXTURE);
final BufferBuilder buffer = Tessellator.getInstance().getBuilder();
@@ -563,7 +562,7 @@ public final class Terminal {
WorldVertexBufferUploader.end(buffer);
}
GlStateManager._depthMask(true);
RenderSystem.depthMask(true);
}
private void validateLineCache(final AtomicInteger dirty, final MatrixStack stack) {
@@ -714,7 +713,7 @@ public final class Terminal {
return;
}
GlStateManager._depthMask(false);
RenderSystem.depthMask(false);
RenderSystem.disableTexture();
stack.pushPose();
@@ -740,7 +739,7 @@ public final class Terminal {
stack.popPose();
RenderSystem.enableTexture();
GlStateManager._depthMask(true);
RenderSystem.depthMask(true);
}
private static boolean isPrintableCharacter(final char ch) {