Skip to content

Commit 150f419

Browse files
committed
opengl spam fix
1 parent b513baf commit 150f419

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/kotlin/com/lambda/graphics/pipeline/ScissorAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ object ScissorAdapter {
4444
val pos1 = rect.leftTop * RenderMain.scaleFactor
4545
val pos2 = rect.rightBottom * RenderMain.scaleFactor
4646

47-
val width = pos2.x - pos1.x
48-
val height = pos2.y - pos1.y
47+
val width = (pos2.x - pos1.x).coerceAtLeast(0.0)
48+
val height = (pos2.y - pos1.y).coerceAtLeast(0.0)
4949

5050
val y = mc.window.framebufferHeight - pos1.y - height
5151

0 commit comments

Comments
 (0)