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

Author Topic: SDL2 Speed vs SFML?  (Read 8957 times)

0 Members and 1 Guest are viewing this topic.

TheGuerilla

  • Newbie
  • *
  • Posts: 27
  • Cynical Prick.exe
    • View Profile
    • Email
SDL2 Speed vs SFML?
« on: March 20, 2016, 09:58:27 pm »
I understand that SFML's speed beats SDL 1.2 by a landslide, but I am making a game engine right now that utilizes SDL2's new hardware-acceleration. So has anyone made a test that compares SDL2's hardware acceleration speed to SFML's speed? If SFML is still faster, I will definitely switch the entire engine to it.

Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32482
    • View Profile
    • SFML's website
    • Email
Re: SDL2 Speed vs SFML?
« Reply #1 on: March 20, 2016, 11:05:37 pm »
I don't think we can answer this question. You should definitely write a small benchmark to check that yourself, this way you can make sure that the code that you test is as close as possible to how you intend to use the libraries in your engine -- and that the results are thus relevant.
Laurent Gomila - SFML developer

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: SDL2 Speed vs SFML?
« Reply #2 on: March 21, 2016, 05:43:17 am »
For the most part the performance is more or less the same.

If you want an exact answer for your situation, you'd have to port your engine to SFML and benchmark it. Alternatively, do like Laurent said and make a small benchmark (wont give you exact results, but close enough).

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: SDL2 Speed vs SFML?
« Reply #3 on: March 21, 2016, 06:38:03 am »
I finished a Lua game engine with SFML.

just need to the port to android (almost done) and other platforms outside windows and finish the docs.

My Lua game engine run very very fast with SFML. You can create without problems the most demanding 2D games with it.

SFML have a very good performance, and an excelent API, without saying that we have here sfe::Movie, LTBL2 , Thor, SFGUI, TGUI, Selba Ward, ETC.

I probably made a GUI for my engine with TGUI or SFGUI.

SFML is full of tools and have clear docs, SDL not to much, the only decent tutorials for advanced topics are from lazy foo, and are ugly in comparison with SFML.

The performance of graphics libraries based on OpenGL is almost the same. The unique thing that will really boost your engine is use raw openGL for specific things. And only with Vulkan you'll have portable graphics with possible multi-thread rendering.
« Last Edit: March 21, 2016, 06:51:39 am by DarkRoku »
I would like a spanish/latin community...
Problems building for Android? Look here

TheGuerilla

  • Newbie
  • *
  • Posts: 27
  • Cynical Prick.exe
    • View Profile
    • Email
Re: SDL2 Speed vs SFML?
« Reply #4 on: March 21, 2016, 11:19:33 pm »
For the most part the performance is more or less the same.

If you want an exact answer for your situation, you'd have to port your engine to SFML and benchmark it. Alternatively, do like Laurent said and make a small benchmark (wont give you exact results, but close enough).
I'm porting it right now. I guess we'll find out. I'm sure hoping its at least the same, because SFML is so much easier to use than SDL2.

EDIT: So I ported the core of the engine and tested it out, and it has about the same performance; so I'm really happy about that. I will definitely be using SFML instead.
« Last Edit: March 22, 2016, 07:35:17 am by TheGuerilla »

Mörkö

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: SDL2 Speed vs SFML?
« Reply #5 on: March 23, 2016, 06:02:33 pm »
What about CSFML?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9817
    • View Profile
    • development blog
    • Email
AW: SDL2 Speed vs SFML?
« Reply #6 on: March 23, 2016, 09:27:13 pm »
CSFML is just a C wrapper around the C++ API, one or two function calls won't make a difference.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/