SFML community forums
Help => Graphics => Topic started by: Charlie on June 15, 2011, 04:38:40 am
-
In other languages I have used, this is the code I use to draw a tile map.
When I use the code below it causes a "grid" to be drawn because there is a one pixel boundary between each image. Why is it doing this?
//Draw Grass Tiles
for (int y=0;y<SCREEN_HEIGHT / TILE_SIZE;y++)
{
for (int x=0;x<SCREEN_WIDTH / TILE_SIZE;x++)
{
Sprite.SetPosition(x * TILE_SIZE, y * TILE_SIZE);
App.Draw(Sprite);
}
}
[/code]
-
It may be caused by the smooth filter
Try image.SetSmooth(false)
-
Thanks! That was the problem.