Stefan Dösinger : wined3d: Correctly handle the y offset with offscreen rendering.

Alexandre Julliard julliard at winehq.org
Tue Nov 27 09:54:32 CST 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Nov 21 23:46:15 2007 +0100

wined3d: Correctly handle the y offset with offscreen rendering.

This fixes a regression introduced with the MAD patch.

---

 dlls/wined3d/state.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index d5bf992..0d735cb 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3373,6 +3373,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
          */
         if (useVertexShaderFunction) {
             device->posFixup[1] = device->render_offscreen ? -1.0 : 1.0;
+            device->posFixup[3] = -device->posFixup[1] / stateblock->viewport.Height;
         }
     }
 
@@ -3496,7 +3497,7 @@ static void viewport(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCon
     checkGLcall("glViewport");
 
     stateblock->wineD3DDevice->posFixup[2] = 1.0 / stateblock->viewport.Width;
-    stateblock->wineD3DDevice->posFixup[3] = -1.0 / stateblock->viewport.Height;
+    stateblock->wineD3DDevice->posFixup[3] = -stateblock->wineD3DDevice->posFixup[1] / stateblock->viewport.Height;
     if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION))) {
         transform_projection(STATE_TRANSFORM(WINED3DTS_PROJECTION), stateblock, context);
     }




More information about the wine-cvs mailing list