0 Members and 2 Guests are viewing this topic.
Indeed, SFML is unable to draw concave shapes; if you need to draw a concave shape, you'll have to split it into multiple convex polygons (if possible).
It is important to keep in mind that a convex shape must always be... convex, otherwise it may not be drawn correctly.
I guess I'm used to reading the source code as documentation
I didn't see any constraints in the code.
It's great to start a public discussion about a class without reading its documentation or tutorials first...Quote from: the docIt is important to keep in mind that a convex shape must always be... convex, otherwise it may not be drawn correctly.
Officially, sf::ConvexShape can only create convex shapes. But in fact, its requirements are a little more relaxed. In fact, the only technical constraint that your shape must follow, is that if you draw a line from its center of gravity to any of its point, you mustn't cross an edge. With this relaxed definition, you can for example draw stars.