]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix rounding of drawsetcliparea coordinates (but not using round(), as that is C99)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 8 Jul 2009 15:29:20 +0000 (15:29 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 8 Jul 2009 15:29:20 +0000 (15:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9051 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index 0ddb11c09e4f6a4c7a838d2aef76fff9a0b8ac83..2724c60d904adcdc40e965a348d7f9cd75e85b16 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -1384,7 +1384,7 @@ void DrawQ_SetClipArea(float x, float y, float width, float height)
 
        // We have to convert the con coords into real coords
        // OGL uses top to bottom
-       GL_Scissor((int)(x * ((float)vid.width / vid_conwidth.integer)), (int)(y * ((float) vid.height / vid_conheight.integer)), (int)(width * ((float)vid.width / vid_conwidth.integer)), (int)(height * ((float)vid.height / vid_conheight.integer)));
+       GL_Scissor((int)(0.5 + x * ((float)vid.width / vid_conwidth.integer)), (int)(0.5 + y * ((float) vid.height / vid_conheight.integer)), (int)(width * ((float)vid.width / vid_conwidth.integer)), (int)(height * ((float)vid.height / vid_conheight.integer)));
 
        GL_ScissorTest(true);
 }