From 312b32716146990d0d49611407cddaf6731c0313 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Wed, 23 Jun 2021 00:01:19 -0700 Subject: [PATCH] Fix fluid rendering bug - ContraptionRenderDispatcher wasn't cleaning up its state, so fluids were being drawn with the wrong shader program --- .../structureMovement/render/ContraptionRenderDispatcher.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java index ce4963c3e..963b93a91 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java @@ -8,6 +8,7 @@ import static org.lwjgl.opengl.GL13.GL_TEXTURE_3D; import static org.lwjgl.opengl.GL13.glActiveTexture; import static org.lwjgl.opengl.GL13.glDisable; import static org.lwjgl.opengl.GL13.glEnable; +import static org.lwjgl.opengl.GL20.glUseProgram; import java.util.List; import java.util.Random; @@ -60,6 +61,8 @@ import net.minecraftforge.common.util.Lazy; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import org.lwjgl.opengl.GL20; + @Mod.EventBusSubscriber public class ContraptionRenderDispatcher { private static final Lazy MODEL_RENDERER = Lazy.of(() -> new BlockModelRenderer(Minecraft.getInstance().getBlockColors())); @@ -130,6 +133,7 @@ public class ContraptionRenderDispatcher { layer.endDrawing(); glDisable(GL_TEXTURE_3D); glActiveTexture(GL_TEXTURE0); + glUseProgram(0); } @SubscribeEvent