]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix drawclipsetarea in D3D9, this fixes the minimap in steelstorm and also the menu...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Mar 2011 17:28:14 +0000 (17:28 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Mar 2011 17:28:14 +0000 (17:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10898 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index 38e1c7ac232bbc131415d29dd1c685d61eb9cc3a..23eed34011f388008fc71b728cc7ca794f5cc6b7 100644 (file)
--- 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);
 }