I think this fixes the texture pixel alignment
authorSam Lantinga <slouken@libsdl.org>
Sat, 19 Sep 2009 12:48:52 +0000
changeset 3279 fd207dce9f94
parent 3278 b2a3cbb9ec08
child 3280 00cace2d9080
I think this fixes the texture pixel alignment
src/video/win32/SDL_d3drender.c
--- a/src/video/win32/SDL_d3drender.c	Sat Sep 19 07:33:15 2009 +0000
+++ b/src/video/win32/SDL_d3drender.c	Sat Sep 19 12:48:52 2009 +0000
@@ -1060,10 +1060,10 @@
         data->beginScene = SDL_FALSE;
     }
 
-    minx = (float) dstrect->x;
-    miny = (float) dstrect->y;
-    maxx = (float) dstrect->x + dstrect->w;
-    maxy = (float) dstrect->y + dstrect->h;
+    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;
 
     minu = (float) srcrect->x / texture->w;
     maxu = (float) (srcrect->x + srcrect->w) / texture->w;