Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GDI primitives vs SFML primitives  (Read 5408 times)

0 Members and 1 Guest are viewing this topic.

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
GDI primitives vs SFML primitives
« 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 ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GDI primitives vs SFML primitives
« Reply #1 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.
Laurent Gomila - SFML developer

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
GDI primitives vs SFML primitives
« Reply #2 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 ? :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
GDI primitives vs SFML primitives
« Reply #3 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
GDI primitives vs SFML primitives
« Reply #4 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GDI primitives vs SFML primitives
« Reply #5 on: March 02, 2010, 08:51:17 pm »
So you should use OpenGL. This will give you the best performances for primitive rendering.
Laurent Gomila - SFML developer

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
GDI primitives vs SFML primitives
« Reply #6 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

Antidote

  • Newbie
  • *
  • Posts: 35
    • View Profile
GDI primitives vs SFML primitives
« Reply #7 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.