diff --git a/src/main/kotlin/org/polyfrost/compose/minecraft/mc/McItemIcon.kt b/src/main/kotlin/org/polyfrost/compose/minecraft/mc/McItemIcon.kt index 5edf374..12c19d9 100644 --- a/src/main/kotlin/org/polyfrost/compose/minecraft/mc/McItemIcon.kt +++ b/src/main/kotlin/org/polyfrost/compose/minecraft/mc/McItemIcon.kt @@ -131,7 +131,7 @@ fun NodeMcItemIcon( val handle = rememberItemIconHandle(stack, decorations) val revision = handle.revision val available = McItemIcons.available - val onDraw: RenderContext.(Float, Float, Float, Float) -> Unit = remember(handle, revision, available, decorations, countOverride, alpha) { + val onDraw: RenderContext.(Float, Float, Float, Float) -> Unit = remember(handle, stack, revision, available, decorations, countOverride, alpha) { { x, y, w, h -> if (available) { handle.draw(this, x, y, w, h, alpha) diff --git a/src/main/kotlin/org/polyfrost/compose/minecraft/render/gl/GlHost.kt b/src/main/kotlin/org/polyfrost/compose/minecraft/render/gl/GlHost.kt index 312ef47..f959699 100644 --- a/src/main/kotlin/org/polyfrost/compose/minecraft/render/gl/GlHost.kt +++ b/src/main/kotlin/org/polyfrost/compose/minecraft/render/gl/GlHost.kt @@ -99,7 +99,7 @@ import org.polyfrost.compose.minecraft.mixin.render.GuiRendererAccessor //? if = 1.8.9 { /*import net.minecraft.client.render.Window -import org.lwjgl.opengl.GL30 +import net.minecraft.client.render.platform.GLX *///?} //? if > 1.8.9 { @@ -460,13 +460,7 @@ object GlHost { } //? if = 1.8.9 { - /*fun mainDrawFbo(): Int { - val previous = GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING) - client.mainRenderTarget.bindWrite(false) - val fbo = GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING) - if (fbo != previous) GlFbo.bind(GL30.GL_FRAMEBUFFER, previous) - return fbo - } + /*fun mainDrawFbo(): Int = if (GLX.useFbo()) client.mainRenderTarget.frameBufferId else 0 fun flushLegacyBatches() { GlStateManager.pushMatrix()