SFML community forums
Help => Graphics => Topic started by: natchos on October 15, 2012, 11:33:01 am
-
Is there any way to, instead of using sf::texture object to create and use a sf::shape, to simply fill the shape with a specified colour and then drawing it to the screen.
Alternatively can you fill a texture object with a single colour instead of loading an image?
-
Yes that's actually the main purpose of a sf::Shape... ;)
If you use textures you might want to check out sf::Sprite.
To fill a sf::Shape (sf::RectangleShape, sf::CircleShape) just call setFillColor().