Remove createRenderPassRewrite.kt

I forgot it

Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2025-04-21 14:23:17 +02:00
parent 8c526473e1
commit 928e691cc9
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -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))
}