SFML community forums

Help => Graphics => Topic started by: hippocat on March 02, 2010, 07:19:13 pm

Title: GDI primitives vs SFML primitives
Post by: hippocat on March 02, 2010, 07:19:13 pm
Just curious if anybody check performance GDI vs SFML, what is faster , lines, ellipses, bitmap drawing ? sure I can write test APP to do so, but probably it was already done ?
Title: GDI primitives vs SFML primitives
Post by: Laurent on March 02, 2010, 07:24:07 pm
As far as I know, nobody ever did that. But I wonder whether this benchmark would be relevant.
Title: GDI primitives vs SFML primitives
Post by: hippocat on March 02, 2010, 08:05:50 pm
If SFML is not better (which is faster IMHO) then GDI what the reason to use it ? :)
Title: GDI primitives vs SFML primitives
Post by: Nexus on March 02, 2010, 08:26:13 pm
Quote from: "hippocat"
If SFML is not better (which is faster IMHO) then GDI what the reason to use it ? :)
You mean you can't imagine any reason to use a framework apart from performance? What about user-friendlyness, provided features, code design or portability?
Title: GDI primitives vs SFML primitives
Post by: hippocat on March 02, 2010, 08:47:28 pm
Until you are not starving, then yes, but in graphics you are always starving :( I have to support reasonable frame rate in map and have responsible GUI. And better performance is my best friend.
Title: GDI primitives vs SFML primitives
Post by: Laurent on March 02, 2010, 08:51:17 pm
So you should use OpenGL. This will give you the best performances for primitive rendering.
Title: GDI primitives vs SFML primitives
Post by: hippocat on March 02, 2010, 09:04:33 pm
It is not friendly ;) and I dont have time to implement own set of classes on top of it. But GDI is also not good. It it is easy to make a leak, no antializing, no transparency. Yes, you can use GDI+ which is cool, but it has no hardware acceleration. So if SFML at least not worst then GDI, it is still acceptable. I'll make this comparison today , something around 10000 shapes
Title: GDI primitives vs SFML primitives
Post by: Antidote on March 08, 2010, 03:10:40 am
Friendly, in this case, is a relative term and should not be used. Sure GDI/GDI+ is "friendly" however the performance hit is rather "unfriendly" not to mention the lack of real support on Vista/7, GDI is dying, let it die in peace.

EDIT:
Forgot to mention "Lock-In".

GDI, while supported fairly well by Wine, is designed for and around windows, therefore limiting your target audience.