From: divverent Date: Wed, 8 Jul 2009 15:29:20 +0000 (+0000) Subject: fix rounding of drawsetcliparea coordinates (but not using round(), as that is C99) X-Git-Tag: xonotic-v0.1.0preview~1576 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=21bae7f7b6a3df8e08905dfff16e3924f0b1a4eb;p=xonotic%2Fdarkplaces.git fix rounding of drawsetcliparea coordinates (but not using round(), as that is C99) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9051 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_draw.c b/gl_draw.c index 0ddb11c0..2724c60d 100644 --- 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); }