diff --git a/common/src/main/kotlin/fr/username404/snowygui/misc/createRenderPassRewrite.kt b/common/src/main/kotlin/fr/username404/snowygui/misc/createRenderPassRewrite.kt deleted file mode 100644 index 7e923ba..0000000 --- a/common/src/main/kotlin/fr/username404/snowygui/misc/createRenderPassRewrite.kt +++ /dev/null @@ -1,33 +0,0 @@ -package fr.username404.snowygui.misc - -import com.mojang.blaze3d.opengl.GlStateManager -import com.mojang.blaze3d.textures.GpuTexture -import net.minecraft.util.ARGB -import org.lwjgl.opengl.GL11 -import java.util.* - -fun createRenderPassRewrite(framebufferId: Int, gpuTexture: GpuTexture, optionalInt: OptionalInt, gpuTexture2: GpuTexture?, optionalDouble: OptionalDouble) { - GlStateManager._glBindFramebuffer(36160, framebufferId) - var clearFlags = 0 - if (optionalInt.isPresent) { - val k: Int = optionalInt.getAsInt() - GL11.glClearColor(ARGB.redFloat(k), ARGB.greenFloat(k), ARGB.blueFloat(k), ARGB.alphaFloat(k)) - clearFlags = 16384 - } - - gpuTexture2?.run { - if (optionalDouble.isPresent) { - GL11.glClearDepth(optionalDouble.asDouble) - clearFlags = clearFlags or 256 - } - } - - if (clearFlags != 0) { - GlStateManager._disableScissorTest() - GlStateManager._depthMask(true) - GlStateManager._colorMask(true, true, true, true) - GlStateManager._clear(clearFlags) - } - - GlStateManager._viewport(0, 0, gpuTexture.getWidth(0), gpuTexture.getHeight(0)) -} \ No newline at end of file