From ac80ffcc006d41c0f40d9d5e3d00f629820aff33 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 15 Aug 2016 08:53:49 +0200 Subject: [PATCH] - fixed scissor calculations in 2D drawer. --- src/gl/renderer/gl_2ddrawer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_2ddrawer.cpp b/src/gl/renderer/gl_2ddrawer.cpp index 8eb7b6c78..ac7d35397 100644 --- a/src/gl/renderer/gl_2ddrawer.cpp +++ b/src/gl/renderer/gl_2ddrawer.cpp @@ -157,8 +157,8 @@ void F2DDrawer::AddTexture(FTexture *img, DrawParms &parms) // scissor test doesn't use the current viewport for the coordinates, so use real screen coordinates dg.mScissor[0] = GLRenderer->ScreenToWindowX(parms.lclip); dg.mScissor[1] = GLRenderer->ScreenToWindowY(parms.dclip); - dg.mScissor[2] = GLRenderer->ScreenToWindowX(parms.rclip) - GLRenderer->ScreenToWindowX(parms.lclip); - dg.mScissor[3] = GLRenderer->ScreenToWindowY(parms.dclip) - GLRenderer->ScreenToWindowY(parms.uclip); + dg.mScissor[2] = GLRenderer->ScreenToWindowX(parms.rclip) - dg.mScissor[0]; + dg.mScissor[3] = GLRenderer->ScreenToWindowY(parms.uclip) - dg.mScissor[1]; FSimpleVertex *ptr = &mVertices[dg.mVertIndex]; ptr->Set(x, y, 0, u1, v1, color); ptr++;