[4/4] WineD3D: Account for offscreen rendering when setting up the clearing

Stefan Dösinger stefan at codeweavers.com
Tue Mar 6 19:46:03 CST 2007


Same fun as in other places. I wonder how many are left :-)

-------------- next part --------------
From 1f36c214f711d68ee118a208552e20b27d3ed68c Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Wed, 7 Mar 2007 01:43:53 +0100
Subject: [PATCH] WineD3D: Account for offscreen rendering when setting up the clearing

scissor rectangle
---
 dlls/wined3d/device.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index dcf4daa..34811c4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4221,8 +4221,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
                 continue;
             }
 
-            glScissor(curRect[i].x1, target->currentDesc.Height - curRect[i].y2,
-                        curRect[i].x2 - curRect[i].x1, curRect[i].y2 - curRect[i].y1);
+            if(This->render_offscreen) {
+                glScissor(curRect[i].x1, curRect[i].y1,
+                          curRect[i].x2 - curRect[i].x1, curRect[i].y2 - curRect[i].y1);
+            } else {
+                glScissor(curRect[i].x1, target->currentDesc.Height - curRect[i].y2,
+                          curRect[i].x2 - curRect[i].x1, curRect[i].y2 - curRect[i].y1);
+            }
             checkGLcall("glScissor");
 
             glClear(glMask);
-- 
1.4.4.3



More information about the wine-patches mailing list