Can you explain how sf::VertexArray could help me? Isn't that one only for primitives like rectangles, etc? I need to draw images onto the screen. Or am I missing something?What are images? Exactly quads/rectangle. ;)
The problem i see here, is that SFML doesn't support depth buffer, so each time you want to remove sprite(or insert it behind existing one), you have to rewrite both arrays (or implement depth buffer).
Try this: http://pastebin.com/DjaXwD4tA few tips: