I'd like the API to remain as simple as possible. Therefore, I have implemented only the most used primitive types, and keep the others for later, when I have more feedback. I don't like to implement things "just because they are available".
I understand your point, but if you provide OpenGL primitive types, then users may expect to be able to use all the 10 of them, as they are all well known and documented.
And the enum PrimitiveType already exists, so the API is barely impacted.
If you don't need them, don't request them
You're right, so here are the use cases that lead me to notice they are missing
- Drawing a hexagonal-tiled map:
// create hexagon (6 vertices) for each tile
sf::Vertex vertices[NB_TILES * 6];
...
// drawing tiles
for (int i = 0; i < NB_TILES; ++i)
target.draw(vertices + (i * 6), 6, GL_POLYGON, states);
which would be more optimized than using a ConvexShape per tile, especially if you don't need transformations for each tile.
And GL_POLYGON could have many other usages anyway.
- I was also trying to draw the outline of a shape, LINE_LOOP could spare the user from creating an additional Vertex for looping with LINE_STRIP.