Stefan Dösinger : wined3d: Combine two glScalef calls into one.

Alexandre Julliard julliard at winehq.org
Thu Dec 27 08:31:30 CST 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Dec 26 22:12:05 2007 +0100

wined3d: Combine two glScalef calls into one.

---

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

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index c62e3fa..59ff3d4 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2826,15 +2826,15 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
          */
         glTranslatef(1.0 / stateblock->viewport.Width, -1.0/ stateblock->viewport.Height, -1.0);
         checkGLcall("glTranslatef (1.0 / width, -1.0 / height, -1.0)");
-        glScalef(1.0, 1.0, 2.0);
-        checkGLcall("glScalef");
-
-        /* D3D texture coordinates are flipped compared to OpenGL ones, so
-            * render everything upside down when rendering offscreen. */
         if (stateblock->wineD3DDevice->render_offscreen) {
-            glScalef(1.0, -1.0, 1.0);
-            checkGLcall("glScalef");
+            /* D3D texture coordinates are flipped compared to OpenGL ones, so
+             * render everything upside down when rendering offscreen. */
+            glScalef(1.0, -1.0, 2.0);
+        } else {
+            glScalef(1.0, 1.0, 2.0);
         }
+        checkGLcall("glScalef");
+
         glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]);
         checkGLcall("glLoadMatrixf");
     }




More information about the wine-cvs mailing list