SFML community forums
Help => General => Topic started by: metafurionx on January 18, 2017, 05:57:50 am
-
My program maps and draws a huge grid of sf::Sprites for the background. Some of them are just static and some are animated. I want to draw the static ones only once and then keep redrawing only the animated ones.
However, sf::RenderWindow.clear() wipes the whole window.
How can I separate both processes so I don't touch the static ones?
-
http://www.sfml-dev.org/tutorials/2.4/graphics-draw.php#the-drawing-window
Especially the red box at the end of the section.
-
How unfortunate.
-
If you run into performance issues, you can always use a vertex array to reduce the number of draw calls. :)
-
What problem are you trying to solve by not re-drawing static sprites?