1
Graphics / Sprite clipping
« on: July 07, 2023, 11:11:43 am »
Im loading this texture and cutting it to sprites,
but for some reason it is showing these white lines from the sprite next to it
Texture
Render
Im using this to load
and this to render:
but for some reason it is showing these white lines from the sprite next to it
Texture
Render
Im using this to load
GUItexture = new sf::Texture;
grayout = new sf::Sprite;
GUItexture->loadFromFile("./data/GUI.png");
grayout->setTextureRect(sf::IntRect(Tile_scale * 3, 5 * Tile_scale, Tile_scale, Tile_scale));
GUItexture->setSmooth(true);
grayout = new sf::Sprite;
GUItexture->loadFromFile("./data/GUI.png");
grayout->setTextureRect(sf::IntRect(Tile_scale * 3, 5 * Tile_scale, Tile_scale, Tile_scale));
GUItexture->setSmooth(true);
and this to render:
//top grayot
grayout->setPosition(sf::Vector2f(0 , -((float)Tile_scale )));
grayout->setRotation(0);
window->draw(*grayout);
//left
grayout->setPosition(sf::Vector2f( -Tile_scale, + ((floatTile_scale * (mapa->mapy))));
grayout->setRotation(270);
window->draw(*grayout);
grayout->setPosition(sf::Vector2f(0 , -((float)Tile_scale )));
grayout->setRotation(0);
window->draw(*grayout);
//left
grayout->setPosition(sf::Vector2f( -Tile_scale, + ((floatTile_scale * (mapa->mapy))));
grayout->setRotation(270);
window->draw(*grayout);