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

Author Topic: SFML Graphic Routines vs OpenGL  (Read 3659 times)

0 Members and 1 Guest are viewing this topic.

Morpheus

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML Graphic Routines vs OpenGL
« on: December 21, 2012, 02:06:46 pm »
Hello everybody,

I've recently changed to SFML and I'm learning OpenGL at the moment.
But I want to know which graphic routine faster is - the one from SFML or the OpenGL functions.
I've read that the SFML routines are based on OpenGL, is that true?
I'm sorry if this question was asked before - I haven't found anything.
Morpheus

PS: I'm German so please forgive me any mistakes.  :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML Graphic Routines vs OpenGL
« Reply #1 on: December 21, 2012, 02:17:11 pm »
SFML is built on top of OpenGL, so the question is meaningless -- of course SFML can't be faster than OpenGL.

The point of SFML is to provide an abstraction, so that you can get rid of tedious low-level code and get good results with good performance. Unless you need something very specific that isn't provided in SFML, there should be no need to use raw OpenGL -- especially not because "it is faster". Mostly, the difference is irrelevant.

You should rather try to design your projects in a nice way, and this works much better when using a high-level library like SFML.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML Graphic Routines vs OpenGL
« Reply #2 on: December 21, 2012, 02:20:38 pm »
SFML uses OpenGL to do all it's rendering.
One can't really say what's faster, because it only depends on what you do and how you do it. General speaking it's obvious that since SFML is based on OpenGL, it has some limitations, which can be good (possibility of making coding mistakes is smaller) but also bad (not flexible enough, doesn't give access to XXX).

If you just want to make 2D graphics, then SFML will be easier to use and provide (nearly) everything you need.
If you also want to go into 3D you'll have to use OpenGL directly or use a 3D render engine like Irrlicht.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Morpheus

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML Graphic Routines vs OpenGL
« Reply #3 on: December 21, 2012, 02:24:27 pm »
OK, thank you very much.
I would have written my own routines based on OpenGL to get hardware acceleration if SFML doesn't have it.
But this seems to be exactly what the SFML programmer have done.  :)

 

anything