Henri Verbeet : wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable().

Alexandre Julliard julliard at winehq.org
Thu Oct 16 06:07:16 CDT 2008


Module: wine
Branch: master
Commit: f5fbfe47d7b5e3667f43708d17eedd62219c3952
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f5fbfe47d7b5e3667f43708d17eedd62219c3952

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Oct 16 11:52:54 2008 +0200

wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable().

---

 dlls/wined3d/surface.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 72f7537..9f0f5f9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4238,18 +4238,25 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
     glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
     checkGLcall("glTexParameteri");
 
+    if (device->render_offscreen)
+    {
+        LONG tmp = rect.top;
+        rect.top = rect.bottom;
+        rect.bottom = tmp;
+    }
+
     glBegin(GL_QUADS);
     glTexCoord3fv(&coords[0].x);
-    glVertex2i(rect.left, device->render_offscreen ? rect.bottom : rect.top);
+    glVertex2i(rect.left, rect.top);
 
     glTexCoord3fv(&coords[1].x);
-    glVertex2i(rect.left, device->render_offscreen ? rect.top : rect.bottom);
+    glVertex2i(rect.left, rect.bottom);
 
     glTexCoord3fv(&coords[2].x);
-    glVertex2i(rect.right, device->render_offscreen ? rect.top : rect.bottom);
+    glVertex2i(rect.right, rect.bottom);
 
     glTexCoord3fv(&coords[3].x);
-    glVertex2i(rect.right, device->render_offscreen ? rect.bottom : rect.top);
+    glVertex2i(rect.right, rect.top);
     glEnd();
     checkGLcall("glEnd");
 




More information about the wine-cvs mailing list