That's a very interesting use case, let me know when it's done
Will do.
I have a slightly different point of view. If you can optimize further without making the code more complicated, and without touching the public API, then yes, optimize.
I also like "Don't do premature optimization" and "Design over performance", but if it's possible without "tricks", one should do it. We're not talking about dirty hacks here, instead we're talking about established and well-known and -used OpenGL features, not hacks.
But if it requires complicated tricks that make the code less maintainable, or adding dedicated functions to the public API, then is it worth the extra FPS?
I'm absolutely sure those optimizations are everything but complicated. I already mentioned it: By using a simple OpenGL display list we were able to boost FPS a lot. a) It's not complicated. b) It can live next to the regular public API, i.e. the user is not forced "to use the optimizations".
2D is not as intensive as 3D, it doesn't require a lot of work to get very good performances.
2D can be very intensive, too. Simple example: Imagine you've got a tilemap, 16*16 pixels for each tile. For a resolution of 1024*768, you've got 64*48 tiles, i.e. 3,072 quads = 12,288 vertices. With SFML you HAVE TO send those 12,288 vertices through the bus EVERY rendering cycle. It will still be "fast" if you compare FPS to a minimum value, but indeed you could go A LOT faster, having more resources for other stuff (logics, physics, etc.). And vertex arrays don't help you out here, too: You still have to send the array through the bus. Buffer objects however can save a lot of time (did it myself, HUGE benefit).
Again, we do it like that in SFGUI: In the beginning we had ~500 FPS with a good amount of widgets. And you could have stopped by saying "500 is good!". Now there're 1200+ FPS. That makes a bunch of extra frametime available to the developer using SFGUI, thus it's getting not as much into his way as before, which is good (especially for libraries!).
So, my plan is to see if everyone is happy with the new API, and optimize it only if it is required, after gathering enough feedback and use cases.
I really did it like you with SFGUI. Then binary1248 joined the party and optimized the hell out of it; seriously, I'm thankful for that: It showed what's possible with rather simple code.
In my humble opinion one should always try to get the best results than just making the "average user" just happy.
If you really want to go there and achieve most possible FPS you would like to implement pseudo-instancing(since SFML will be limited to OpenGL 2.0 I think it was, else we can do real)
Instancing is another side of the medal. However, saying SFML is limited to OpenGL 2.0 is wrong. It's not limited to anything. You can add fallbacks. Hardware supporting instancing can use it, the others will use fallbacks. It's done like that in so many games/applications..
The problem would be like Laurent says he wants to avoid, making the code less maintainable. Everything will have to be more or less constructed around that as it's core.
The real problem is that you don't have the choice really. In SFGUI we already had to work-around SFML's rendering pipeline "a bit" to make some optimizations possible. And I don'T see a clear reason why adding conditional features to a library makes it less maintainable. If those things were hacks, then yes, I fully agree. But we don't have hacks, we have normal features. You could also argue that adding vertex buffers is unmaintanable because you have OpenGL immediate mode, it's useless.
But this would require batching internally by SFML in order to keep the code simple enough. But like said, you won't be able to get better FPS than that. And Laurent has already put his foot down there and said no Not going to argue with that.
Well, why has everything to be "simple"? If you don't need optimizations and "pro" features, don't use them. If someone doesn't need batching, because his Pacman game has great performance, everything's alright. But why don't allow the user to have more control of the whole pipeline? I think this is perfectly possible, without striping out the "S" out of "SFML". Simple is relative, too.
And just because Laurent says "No" it doesn't mean I'll say "Alright".
I think such discussions are welcome and everybody should be able to think about it and honestly admit to be wrong if that's the case. If there's nothing left in SFML to be optimized without raping the whole API, then I'll paddle back and officially state a "Sorry, you were right".
Also, Merry Christmas!
Swede's celebrate it on the 24th
Merry Christmas to you guys too. Same in Germany.