From 4a2b33c457e253faba78baa489be16778032281a Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Mon, 13 May 2024 23:50:03 +1000 Subject: use some more gl constants (#1783) --- src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 3 ++- src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 765a51e95..af68cd847 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -24,6 +24,7 @@ import net.minecraft.client.gui.inventory.GuiInventory import net.minecraft.client.renderer.GlStateManager import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import org.lwjgl.opengl.GL11 import java.util.UUID import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.minutes @@ -54,7 +55,7 @@ class GuiEditManager { fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { GlStateManager.color(1f, 1f, 1f, 1f) GlStateManager.enableBlend() - GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0) + GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt index a2652404f..af3683402 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt @@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import org.lwjgl.opengl.GL11 import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds @@ -66,7 +67,7 @@ class TitleManager { val height = scaledResolution.scaledHeight GlStateManager.enableBlend() - GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0) + GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0) val renderer = Minecraft.getMinecraft().fontRendererObj GlStateManager.pushMatrix() -- cgit