# HG changeset patch # User Sam Lantinga # Date 1253339274 0 # Node ID 7690aa2f5b74690a451db57a552dee1e1f4ac0af # Parent 7856dfe3a44f7db47285e1a830352ee0eab501d0 testsprite2 should be pixel correct on Direct3D now. diff -r 7856dfe3a44f -r 7690aa2f5b74 src/video/win32/SDL_d3drender.c --- a/src/video/win32/SDL_d3drender.c Sat Sep 19 05:45:49 2009 +0000 +++ b/src/video/win32/SDL_d3drender.c Sat Sep 19 05:47:54 2009 +0000 @@ -894,8 +894,8 @@ color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b); - vertices[0].x = (float) x - 0.5f; - vertices[0].y = (float) y - 0.5f; + vertices[0].x = (float) x; + vertices[0].y = (float) y; vertices[0].z = 0.0f; vertices[0].rhw = 1.0f; vertices[0].color = color; @@ -936,16 +936,16 @@ color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b); - vertices[0].x = (float) x1 - 0.5f; - vertices[0].y = (float) y1 - 0.5f; + vertices[0].x = (float) x1; + vertices[0].y = (float) y1; vertices[0].z = 0.0f; vertices[0].rhw = 1.0f; vertices[0].color = color; vertices[0].u = 0.0f; vertices[0].v = 0.0f; - vertices[1].x = (float) x2 - 0.5f; - vertices[1].y = (float) y2 - 0.5f; + vertices[1].x = (float) x2; + vertices[1].y = (float) y2; vertices[1].z = 0.0f; vertices[1].rhw = 1.0f; vertices[1].color = color; @@ -985,10 +985,10 @@ data->beginScene = SDL_FALSE; } - minx = (float) rect->x - 0.5f; - miny = (float) rect->y - 0.5f; - maxx = (float) rect->x + rect->w - 0.5f; - maxy = (float) rect->y + rect->h - 0.5f; + minx = (float) rect->x; + miny = (float) rect->y; + maxx = (float) rect->x + rect->w; + maxy = (float) rect->y + rect->h; color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b); @@ -1060,10 +1060,10 @@ data->beginScene = SDL_FALSE; } - minx = (float) dstrect->x - 0.5f; - miny = (float) dstrect->y - 0.5f; - maxx = (float) dstrect->x + dstrect->w - 0.5f; - maxy = (float) dstrect->y + dstrect->h - 0.5f; + minx = (float) dstrect->x; + miny = (float) dstrect->y; + maxx = (float) dstrect->x + dstrect->w; + maxy = (float) dstrect->y + dstrect->h; minu = (float) srcrect->x / texture->w; maxu = (float) (srcrect->x + srcrect->w) / texture->w;