wined3d: Handle offscreen rendering a bit nicer in surface_blt_to_drawable().
Henri Verbeet
hverbeet at codeweavers.com
Thu Oct 16 04:52:54 CDT 2008
---
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");
--
1.5.6.4
--------------080202060704050708080208--
More information about the wine-patches
mailing list