Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_d3drender.c @ 3279:fd207dce9f94
I think this fixes the texture pixel alignment
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 19 Sep 2009 12:48:52 +0000 |
parents | 7690aa2f5b74 |
children | 36cf454ba065 |
line wrap: on
line diff
--- 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;