Do you suggest to do this optimization for all sf::Drawable objects rendered with sf::BlendNone? Or rather "behind the scene" for other blend modes, when non-textured sf::Shape objects are rendered, filled and outlined with a color that is either fully opaque (alpha=255) or fully transparent (alpha=0; in that case they needn't be drawn)?
I wouldn't go that far as to work behind the scene, as this may actually degrade performance unless a full batch renderer is implemented inside SFML. My suggestion is minimalistic - disable blending only when the user
explicitly specifies
BlendNone. This minimizes the risk of implementing it (see below).
Are you sure that disabling the blend mode is still faster than e.g. constant switching of that state?
In the general case? No. That's why I think it's important to see what other frameworks do.
Note that the worst case of constant switching will occur only if the user explicitly switches blend modes, which is discouraged anyway for performance. Not to mention that many users may be able to develop with SFML without changing its default blend mode, so this only applies to users who actively modified it.
If you target software renderers, SFML is not the library of choice...
Why is that?
I can see why SFML is suboptimal for applications, with its constant need for redrawing the entire window even if nothing has changed, not hinting at which rectangular areas of the window have been invalidated.
But suppose that you were to develop a game, with animations and all that, why would SFML be inferior to other libraries with respect to running on software renderers?