Fix crash on windows (#1766)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-05-19 08:02:37 -07:00
1 parent fa91b70528
commit 9c1b6c75ff
8 files changed
+50 -8

No files matched your search

@@ -14,6 +14,7 @@ import net.coderbot.iris.pipeline.WorldRenderingPipeline;
import net.coderbot.iris.rendertarget.RenderTarget;
import net.coderbot.iris.shaderpack.PackShadowDirectives;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL30;
import java.util.ArrayList;
import java.util.List;
@@ -283,8 +284,9 @@ public class ShadowRenderTargets {
framebuffer.drawBuffers(actualDrawBuffers);
framebuffer.readBuffer(0);
if (!framebuffer.isComplete()) {
throw new IllegalStateException("Unexpected error while creating framebuffer");
final int status = framebuffer.getStatus();
if (status != GL30.GL_FRAMEBUFFER_COMPLETE) {
throw new IllegalStateException(String.format( "Unexpected error while creating shadow framebuffer: glCheckFramebufferStatus=0x%X, resolution=%d, drawBuffers=%d", status, resolution, drawBuffers.length));
}
return framebuffer;