Yes, so it looks like the
draw() call takes up the majority of the time.
(The few comparisons in the
if are definitely negligible, but it would be good to write those statements on different lines in any case.)
You can use
sf::VertexArray with the
sf::Triangles primitive.
Note that
thor::ConcaveShape already uses vertex arrays internally, and it will be much easier to transition from your current
sf::ConvexShape implementation, as both classes have a very similar API. One little thing to keep in mind is that there's still one vertex array
per concave shape; but if there are only a few dozens of concave shapes in total, that should not be a problem. You could use the master branch of Thor, or one of eXpl0it3r's nightly builds. If you need help setting things up, just tell me