SDL/SFML

I have finished basics in c++ and now I would like to advance to graphics designing whats better to use ?
1.SFML
2.SDL
Hi,
> I would like to advance to graphics designing whats better to use?
1. SFML
2. HGE (GitHub) - easy for beginner
I've used SDL for a bit, I would go SFML. I use SDL for the sake of knowing how to use it.
thanks tristan
There is basically one difference from my experience between the two.

SFML - Uses C++ design.

SDL - Uses C design.

Both are good libraries and there isn't really that much of a difference between the two other then the design. So in my opinion the choice really comes down to "Does an object oriented design matter to you?". If so then I would go for SFML, if not then either one of them can work fine for you.

Here is a few quick example to demonstrate what I am talking about take a quick look at the two codebases.

SFML Mouse.hpp - https://github.com/SFML/SFML/blob/master/include/SFML/Window/Mouse.hpp

SDL SDL_mouse.h - https://github.com/zielmicha/SDL2/blob/master/include/SDL_mouse.h


SFML Rect.hpp - https://github.com/SFML/SFML/blob/master/include/SFML/Graphics/Rect.hpp

SDL - SDL_Rect.h - https://github.com/zielmicha/SDL2/blob/master/include/SDL_rect.h


SFML Touch.hpp - https://github.com/SFML/SFML/blob/master/include/SFML/Window/Touch.hpp

SDL SDL_touch.h - https://github.com/zielmicha/SDL2/blob/master/include/SDL_touch.h


It becomes quite apparent the different design decisions that both frameworks used, heck even the language is quite apparent. Anyways hope that helps.
Last edited on
Topic archived. No new replies allowed.