aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorFourmisain <8464472+Fourmisain@users.noreply.github.com>2021-07-16 21:48:50 +0200
committerGitHub <noreply@github.com>2021-07-16 22:48:50 +0300
commitc95d786fba6f378d793e4969931c1a735a78f442 (patch)
tree1ebd89a6095907acb0928bd482a1018d68caeadf /src/main/java/io
parent8e0570f3e6c87b835b3dd22a0f57744af7ae008d (diff)
downloadLibGui-c95d786fba6f378d793e4969931c1a735a78f442.tar.gz
LibGui-c95d786fba6f378d793e4969931c1a735a78f442.tar.bz2
LibGui-c95d786fba6f378d793e4969931c1a735a78f442.zip
fix texturedRect() not blending transparent textures (#125)
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
index c1d17e0..0035d93 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
@@ -141,6 +141,7 @@ public class ScreenDrawing {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
Matrix4f model = matrices.peek().getModel();
+ RenderSystem.enableBlend();
RenderSystem.setShaderTexture(0, texture);
RenderSystem.setShaderColor(r, g, b, opacity);
RenderSystem.setShader(GameRenderer::getPositionTexShader);
@@ -151,6 +152,7 @@ public class ScreenDrawing {
buffer.vertex(model, x, y, 0).texture(u1, v1).next();
buffer.end();
BufferRenderer.draw(buffer);
+ RenderSystem.disableBlend();
}
/**