mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Fix fluid rendering bug
- ContraptionRenderDispatcher wasn't cleaning up its state, so fluids were being drawn with the wrong shader program
This commit is contained in:
parent
64c55c1205
commit
312b327161
1 changed files with 4 additions and 0 deletions
|
@ -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<BlockModelRenderer> 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
|
||||
|
|
Loading…
Reference in a new issue