just use the currently bound fb (and pray its correct)

This commit is contained in:
mcrcortex
2025-05-23 12:13:38 +10:00
parent 74dac668fb
commit b8a16fb087

View File

@@ -191,9 +191,10 @@ public class VoxyRenderSystem {
int oldFB = GL11.glGetInteger(GL_DRAW_FRAMEBUFFER_BINDING); int oldFB = GL11.glGetInteger(GL_DRAW_FRAMEBUFFER_BINDING);
int boundFB = oldFB;
var target = DefaultTerrainRenderPasses.CUTOUT.getTarget(); var target = DefaultTerrainRenderPasses.CUTOUT.getTarget();
int boundFB = ((net.minecraft.client.texture.GlTexture) target.getColorAttachment()).getOrCreateFramebuffer(((GlBackend) RenderSystem.getDevice()).getFramebufferManager(), target.getDepthAttachment()); //boundFB = ((net.minecraft.client.texture.GlTexture) target.getColorAttachment()).getOrCreateFramebuffer(((GlBackend) RenderSystem.getDevice()).getFramebufferManager(), target.getDepthAttachment());
if (boundFB == 0) { if (boundFB == 0) {
throw new IllegalStateException("Cannot use the default framebuffer as cannot source from it"); throw new IllegalStateException("Cannot use the default framebuffer as cannot source from it");
} }