From 1f0557739548fe171e43591cfbcfece083c252b7 Mon Sep 17 00:00:00 2001 From: Oliver Stieber Date: Wed, 3 Aug 2005 19:14:19 +0000 Subject: [PATCH] Improve on a fixup for the difference between opengl and directx pixel centering of vertexes. --- dlls/wined3d/drawprim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 894191019b0..fef99feabae 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -272,8 +272,8 @@ static BOOL primitiveInitState(IWineD3DDevice *iface, BOOL vtx_transformed, BOOL instead. */ glLoadIdentity(); - glTranslatef(1.0 / This->stateBlock->viewport.Width, -1.0 / This->stateBlock->viewport.Height, 0); - checkGLcall("glTranslatef (1.0 / width, -1.0 / height, 0)"); + glTranslatef(0.9 / This->stateBlock->viewport.Width, -0.9 / This->stateBlock->viewport.Height, 0); + checkGLcall("glTranslatef (0.9 / width, -0.9 / height, 0)"); if (This->renderUpsideDown) { glMultMatrixf(invymat); @@ -296,8 +296,8 @@ static BOOL primitiveInitState(IWineD3DDevice *iface, BOOL vtx_transformed, BOOL glLoadIdentity(); /* Window Coord 0 is the middle of the first pixel, so translate by half a pixel (See comment above glTranslate above) */ - glTranslatef(1.0 / This->stateBlock->viewport.Width, -1.0 / This->stateBlock->viewport.Height, 0); - checkGLcall("glTranslatef (1.0 / width, -1.0 / height, 0)"); + glTranslatef(0.9 / This->stateBlock->viewport.Width, -0.9 / This->stateBlock->viewport.Height, 0); + checkGLcall("glTranslatef (0.9 / width, -0.9 / height, 0)"); if (This->renderUpsideDown) { glMultMatrixf(invymat); checkGLcall("glMultMatrixf(invymat)");