From f1b67f5ab70d5eb294040027d14dc901679164a4 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 6 Mar 2011 17:28:14 +0000 Subject: [PATCH] fix drawclipsetarea in D3D9, this fixes the minimap in steelstorm and also the menu scrolling git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10898 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_draw.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gl_draw.c b/gl_draw.c index 38e1c7ac..23eed340 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -2047,7 +2047,25 @@ void DrawQ_SetClipArea(float x, float y, float width, float height) 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; - GL_Scissor(ix, vid.height - iy - ih, iw, ih); + switch(vid.renderpath) + { + case RENDERPATH_GL11: + case RENDERPATH_GL13: + case RENDERPATH_GL20: + case RENDERPATH_GLES2: + case RENDERPATH_SOFT: + GL_Scissor(ix, vid.height - iy - ih, iw, ih); + break; + case RENDERPATH_D3D9: + GL_Scissor(ix, iy, iw, ih); + break; + case RENDERPATH_D3D10: + Con_DPrintf("FIXME D3D10 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); + break; + case RENDERPATH_D3D11: + Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); + break; + } GL_ScissorTest(true); } -- 2.39.2