wined3d: Translate before scaling for rhw as well in transform_projection().
This commit is contained in:
parent
8e0cb60b09
commit
952dfe30be
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue