SFML community forums

Help => Graphics => Topic started by: Fox3 on July 03, 2010, 03:52:06 pm

Title: Black borders in tiles
Post by: Fox3 on July 03, 2010, 03:52:06 pm
I have this tile here, and I made a tiled background with it. But it show some black borders in it. I dont know why :( Can someone help me?

Code: [Select]

    images["BGGround"].LoadFromFile("resources/background/ground.png");
    for(unsigned int i = 0; i < width+2; i++)
    {
        sf::Sprite groundTile;
        groundTile.SetCenter(0,0);
        groundTile.SetImage(images["BGGround"]);
        groundTile.SetPosition(-(float(width)/2 +1)*64+i*64,0);
        background.push_back(groundTile);
    }


Here is a screenshot:
(http://img821.imageshack.us/img821/8152/clipboard01ru.th.jpg) (http://img821.imageshack.us/i/clipboard01ru.jpg/)
Title: Black borders in tiles
Post by: Walker on July 03, 2010, 06:11:43 pm
This (http://sfml-dev.org/forum/viewtopic.php?t=2417) has been coming up a lot lately.

Me thinks you need to Image::SetSmooth(false) as mentioned in the thread I linked.
Title: Black borders in tiles
Post by: Fox3 on July 03, 2010, 06:18:55 pm
Thanks that solved my problem :D