From: divverent Date: Fri, 22 Sep 2017 17:09:27 +0000 (+0000) Subject: Make work DrawQ_SetClipArea in stereo view modes or when viewsize is lower than 100 X-Git-Tag: xonotic-v0.8.5~76 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2319e933019f2bd60f2ef245079a0f8c4428d3e0;p=xonotic%2Fdarkplaces.git Make work DrawQ_SetClipArea in stereo view modes or when viewsize is lower than 100 NOTE from divVerent: the previous followmodel-related commit was mistakenly attributed to me, but was actually by terencehill too. Signed-off-by: terencehill git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12339 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=023d02148e88cc846dbd76ffa312703c2eef1cd7 --- diff --git a/gl_draw.c b/gl_draw.c index 0f0c3670..eae39c74 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -2111,10 +2111,10 @@ 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 - ix = (int)(0.5 + x * ((float)vid.width / vid_conwidth.integer)); - iy = (int)(0.5 + y * ((float) vid.height / vid_conheight.integer)); - iw = (int)(0.5 + (x+width) * ((float)vid.width / vid_conwidth.integer)) - ix; - ih = (int)(0.5 + (y+height) * ((float) vid.height / vid_conheight.integer)) - iy; + ix = (int)(0.5 + x * ((float)r_refdef.view.width / vid_conwidth.integer)) + r_refdef.view.x; + iy = (int)(0.5 + y * ((float)r_refdef.view.height / vid_conheight.integer)) + r_refdef.view.y; + iw = (int)(0.5 + width * ((float)r_refdef.view.width / vid_conwidth.integer)); + ih = (int)(0.5 + height * ((float)r_refdef.view.height / vid_conheight.integer)); switch(vid.renderpath) { case RENDERPATH_GL11: