testsprite2 should be pixel correct on Direct3D now.
1.1 --- a/src/video/win32/SDL_d3drender.c Sat Sep 19 05:45:49 2009 +0000
1.2 +++ b/src/video/win32/SDL_d3drender.c Sat Sep 19 05:47:54 2009 +0000
1.3 @@ -894,8 +894,8 @@
1.4
1.5 color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
1.6
1.7 - vertices[0].x = (float) x - 0.5f;
1.8 - vertices[0].y = (float) y - 0.5f;
1.9 + vertices[0].x = (float) x;
1.10 + vertices[0].y = (float) y;
1.11 vertices[0].z = 0.0f;
1.12 vertices[0].rhw = 1.0f;
1.13 vertices[0].color = color;
1.14 @@ -936,16 +936,16 @@
1.15
1.16 color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
1.17
1.18 - vertices[0].x = (float) x1 - 0.5f;
1.19 - vertices[0].y = (float) y1 - 0.5f;
1.20 + vertices[0].x = (float) x1;
1.21 + vertices[0].y = (float) y1;
1.22 vertices[0].z = 0.0f;
1.23 vertices[0].rhw = 1.0f;
1.24 vertices[0].color = color;
1.25 vertices[0].u = 0.0f;
1.26 vertices[0].v = 0.0f;
1.27
1.28 - vertices[1].x = (float) x2 - 0.5f;
1.29 - vertices[1].y = (float) y2 - 0.5f;
1.30 + vertices[1].x = (float) x2;
1.31 + vertices[1].y = (float) y2;
1.32 vertices[1].z = 0.0f;
1.33 vertices[1].rhw = 1.0f;
1.34 vertices[1].color = color;
1.35 @@ -985,10 +985,10 @@
1.36 data->beginScene = SDL_FALSE;
1.37 }
1.38
1.39 - minx = (float) rect->x - 0.5f;
1.40 - miny = (float) rect->y - 0.5f;
1.41 - maxx = (float) rect->x + rect->w - 0.5f;
1.42 - maxy = (float) rect->y + rect->h - 0.5f;
1.43 + minx = (float) rect->x;
1.44 + miny = (float) rect->y;
1.45 + maxx = (float) rect->x + rect->w;
1.46 + maxy = (float) rect->y + rect->h;
1.47
1.48 color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
1.49
1.50 @@ -1060,10 +1060,10 @@
1.51 data->beginScene = SDL_FALSE;
1.52 }
1.53
1.54 - minx = (float) dstrect->x - 0.5f;
1.55 - miny = (float) dstrect->y - 0.5f;
1.56 - maxx = (float) dstrect->x + dstrect->w - 0.5f;
1.57 - maxy = (float) dstrect->y + dstrect->h - 0.5f;
1.58 + minx = (float) dstrect->x;
1.59 + miny = (float) dstrect->y;
1.60 + maxx = (float) dstrect->x + dstrect->w;
1.61 + maxy = (float) dstrect->y + dstrect->h;
1.62
1.63 minu = (float) srcrect->x / texture->w;
1.64 maxu = (float) (srcrect->x + srcrect->w) / texture->w;