aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/utils
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-09 13:54:52 +0900
committersyeyoung <cyong06@naver.com>2021-05-09 13:54:52 +0900
commitc7543c833f9bf57c79f8f58c5c91beacb5d986f9 (patch)
tree76aba465eed5a57784d8413373608c6787605408 /src/main/java/kr/syeyoung/dungeonsguide/utils
parentc4a55b2540bb79cf087040721fd3146a3fe9ae92 (diff)
downloadSkyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.tar.gz
Skyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.tar.bz2
Skyblock-Dungeons-Guide-c7543c833f9bf57c79f8f58c5c91beacb5d986f9.zip
FIX TEXT FLASHING. BLEND GO BRRRRR
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
index 07812486..204ed360 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
@@ -38,6 +38,7 @@ import net.minecraft.util.*;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
import javax.vecmath.Vector3f;
import java.awt.*;
@@ -121,6 +122,9 @@ public class RenderUtils {
drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 - 3 + 1, i1, i1);
drawGradientRect(l1 - 3, i2 + k + 2, l1 + i + 3, i2 + k + 3, j1, j1);
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
for (int k1 = 0; k1 < textLines.size(); ++k1)
{
String s1 = textLines.get(k1);
@@ -1004,6 +1008,9 @@ public class RenderUtils {
GlStateManager.enableTexture2D();
}
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
fontRenderer.drawString(text, -textWidth / 2, 0, color);
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);