Henri Verbeet : wined3d: Translate before scaling for rhw as well in transform_projection().
Alexandre Julliard
julliard at winehq.org
Mon Sep 6 13:53:11 CDT 2010
Module: wine
Branch: master
Commit: 952dfe30be68848fb3799ddb4e732f0e9c7fdbe2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=952dfe30be68848fb3799ddb4e732f0e9c7fdbe2
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Sep 5 23:38:49 2010 +0200
wined3d: Translate before scaling for rhw as well in transform_projection().
---
dlls/wined3d/state.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 2224247..c04b317 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3905,10 +3905,6 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
glOrtho(x, x + w, y + h, y, 0.0, -1.0);
checkGLcall("glOrtho");
- /* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
- glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f);
- checkGLcall("glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f)");
-
/* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */
if (context->render_offscreen)
@@ -3916,7 +3912,13 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
glScalef(1.0f, -1.0f, 1.0f);
checkGLcall("glScalef");
}
- } else {
+
+ /* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
+ glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f);
+ checkGLcall("glTranslatef(63.0f / 128.0f, -63.0f / 128.0f, 0.0f)");
+ }
+ else
+ {
/* The rule is that the window coordinate 0 does not correspond to the
beginning of the first pixel, but the center of the first pixel.
As a consequence if you want to correctly draw one line exactly from
More information about the wine-cvs
mailing list