bardes bardes - 8 months ago 36
C++ Question

How to manipulate images with SFML?

I'm working on a game and I need to draw a sequence of tiles into a

, but the only way I could draw something into a
) was by editing the pixels directly.

I'd like to know if there is any function like the
or something like that in SFML. The only object I could draw things on was the

Am I doing something wrong or forgetting about something?


You can use sf::RenderTexture to call Draw functions with any drawable and take the result as a sf::Texture. You can then convert the sf::Texture to a sf::Image. Just take a look in documentation.