mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-18 19:39:09 +00:00
Fix crash on windows (#1766)
This commit is contained in:
1 parent
fa91b70528
commit
9c1b6c75ff
8 files changed
+50
-8
No files matched your search
@@ -18,6 +18,7 @@ import net.coderbot.iris.shaderpack.texture.TextureStage;
|
||||
import net.coderbot.iris.uniforms.FrameUpdateNotifier;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.shader.Framebuffer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.OptionalInt;
|
||||
@@ -33,8 +34,12 @@ public class FixedFunctionWorldRenderingPipeline implements WorldRenderingPipeli
|
||||
|
||||
@Override
|
||||
public void beginLevelRendering() {
|
||||
final Framebuffer mainFb = Minecraft.getMinecraft().getFramebuffer();
|
||||
if (mainFb == null || mainFb.framebufferWidth < 16 || mainFb.framebufferHeight < 16) {
|
||||
return;
|
||||
}
|
||||
// Use the default Minecraft framebuffer and ensure that no programs are in use
|
||||
Minecraft.getMinecraft().getFramebuffer().bindFramebuffer(true);
|
||||
mainFb.bindFramebuffer(true);
|
||||
GLStateManager.glUseProgram(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user