From 9c92e4d3530ea6f0d2b403a59715a8b100028d63 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Mon, 26 Jul 2021 16:18:38 -0700 Subject: [PATCH] Update LightVolume to use enum wrapper for glActiveTexture --- src/main/java/com/jozufozu/flywheel/light/LightVolume.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jozufozu/flywheel/light/LightVolume.java b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java index f5a70b5b2..4f7bbe130 100644 --- a/src/main/java/com/jozufozu/flywheel/light/LightVolume.java +++ b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java @@ -29,6 +29,7 @@ import org.lwjgl.system.MemoryUtil; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.gl.GlTexture; +import com.jozufozu.flywheel.backend.gl.GlTextureUnit; import com.jozufozu.flywheel.backend.gl.versioned.RGPixelFormat; import net.minecraft.util.math.BlockPos; @@ -257,7 +258,7 @@ public class LightVolume { // just in case something goes wrong or we accidentally call this before this volume is properly disposed of. if (lightData == null || removed) return; - glActiveTexture(GL_TEXTURE4); + GlTextureUnit.T4.makeActive(); glTexture.bind(); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);