Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CZmisaCZ

Pages: [1]
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
    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);

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);

Pages: [1]
anything