@@ -28,20 +28,24 @@ import com.lambda.graphics.gl.Matrices.resetMatrices
2828import com.lambda.graphics.renderer.esp.global.DynamicESP
2929import com.lambda.graphics.renderer.esp.global.StaticESP
3030import com.lambda.util.math.Vec2d
31+ import com.mojang.blaze3d.opengl.GlStateManager
32+ import com.mojang.blaze3d.systems.RenderSystem
33+ import net.minecraft.client.gl.GlBackend
34+ import net.minecraft.client.texture.GlTexture
3135import org.joml.Matrix4f
36+ import org.lwjgl.opengl.GL30.GL_FRAMEBUFFER
3237
3338object RenderMain {
3439 val projectionMatrix = Matrix4f ()
3540 val modelViewMatrix get() = Matrices .peek()
3641 val projModel: Matrix4f get() = Matrix4f (projectionMatrix).mul(modelViewMatrix)
3742
3843 var screenSize = Vec2d .ZERO
39- var scaleFactor = 1.0
4044
4145 @JvmStatic
42- fun render3D (positionMatrix : Matrix4f , projectionMatrix : Matrix4f ) {
46+ fun render3D (positionMatrix : Matrix4f , projMatrix : Matrix4f ) {
4347 resetMatrices(positionMatrix)
44- projectionMatrix.set(projectionMatrix )
48+ projectionMatrix.set(projMatrix )
4549
4650 setupGL {
4751 RenderEvent .World ().post()
@@ -61,17 +65,4 @@ object RenderMain {
6165 DynamicESP .upload()
6266 }
6367 }
64-
65- private fun rescale (factor : Double ) {
66- val width = mc.window.framebufferWidth.toFloat()
67- val height = mc.window.framebufferHeight.toFloat()
68-
69- val scaledWidth = width / factor
70- val scaledHeight = height / factor
71-
72- screenSize = Vec2d (scaledWidth, scaledHeight)
73- scaleFactor = factor
74-
75- projectionMatrix.setOrtho(0f , scaledWidth.toFloat(), scaledHeight.toFloat(), 0f , 1000f , 21000f )
76- }
7768}
0 commit comments