SFML community forums
General => General discussions => Topic started by: Yours3lf on April 11, 2011, 08:33:17 am
-
Hi everybody,
I've heard lots of great things about SFML, and I also experimented with it.
my question is, when using it for nothing more than input and window handling, and creating an OpenGL context (and using OpenGL for rendering) is it faster than SDL?
(I'm not curious about the two libraries' own 2D drawing performance.)
my other question would be, does it provide OpenGL context profiling like FreeGLUT does?
(I mean, can I specify that I only want the core context to be present?)
Best regards,
Yours3lf
-
my question is, when using it for nothing more than input and window handling, and creating an OpenGL context (and using OpenGL for rendering) is it faster than SDL?
Windowing doesn't consume a relevant part of the overall performances, so you don't even need to ask this question, it really doesn't matter.
my other question would be, does it provide OpenGL context profiling like FreeGLUT does?
Not yet, but in a future version it should be available.
-
Well, from a very, very cursory search, it sounds like SDL uses software rendering, as opposed to the OpenGL-based hardware acceleration SFML uses, as well as omitting several useful APIs. It's also supposed to be Object-Oriented, meaning that you'll have to write cleaner code to get it to work, but you'll also run into less headaches working on it. In the world of APIs, newer tends to mean "more evolved for current usage," along with "doing things made impossible previously by physical or mechanical constraints." I wouldn't say hardware acceleration is "some way," I'd say that, if you knew how to use SDL, and could move to SFML, it would probably make your game faster, easier to code, and less likely to cause you headaches from "gotchas."
In other words, faster, simpler, and cleaner, is what I've been seeing. It's also under active development, too, so unless you have need for a large development community to help you, SFML should have sufficient advantages to make SDL the less desirable option.
-
I asked because I did have problems with SDL in the past, but the great community at sdltutorials.com helped me out, and since then I didn't encounter any problems with it.
Another reason I asked this is because I want to teach engine programming for beginners, and I wondered if SFML was easier would it be better to show it to people instead of SDL's old fashioned way.
To add, after creating the SDL context, there is no other problem with it, since I don't intend to use it for anything else, and creating the context is real easy even with SDL.
it sounds like SDL uses software rendering, as opposed to the OpenGL-based hardware acceleration SFML uses
That is right but as I said:
I'm not curious about the two libraries' own 2D drawing performance.
Edit: specifying OpenGL context profiles would be the only reason I'd move to SFML, because I'd use other libraries for audio, networking, image loading etc.
Best regards,
Yours3lf
-
Try IRRLICHT (usable in C++, FreeBasic and QB64 (i have yet to finish the FreeBasic to QB64 wrapper conversion, but a lot of it works.) and many more platforms (i think someone maanegd to link it to SFML aswell)) It has 2 software renderers and supports OpenGL and direct x 8 and 9. It also has built in support for loading and displaying animated and static 3d models, maps and input controls as well as standrad opengl commands.
-
is IRRLICHT some sort of wrapper for the APIs?
btw I want to teach pure OpenGL, and I posted this topic, because I want to focus on OpenGL not creating a window and messing around with it. this is one of SFML's great advantages.
-
As Laurent said, Windowing and Event handling consumes only a completely negligble part of performance on any system that was built in the last 10 years.
If you're teaching OpenGL using C++, you should definitely use SFML since it has a much clearer and easier to use design.
-
I stumble upon SFML and like what it offered:
SFML 1.4+
- OpenGL hardware accelerated image and text drawing with scaling and
revolution!!!
- Does everything else too, tune, jingle, input, timing, etc
After making several games with both SDL and SFML,
I can honestly not say which is better...
If you have the time and are interested, I recommend you take a look
at SFML:
(www.sfml-dev.org )
That’s all I have to say... :)
-
@nhnaaldaia
thank you for the recommendation. I already have took my time, and have learnt SFML, and I'm using it, and I'm quite convinced.
I can honestly not say which is better...
I agree, however I felt like SFML gives you more freedom in terms of how you connect to it (inheritance etc.), but this is related to the library being object oriented.
-
On a related note: we are currently starting a new small game and intend to use SFML for the major part (if not all) of it.
The latest stable is 1.6, but from browsing the forums it seems it is no longer supported and a bit out of date. At about half of the bug/error-reports it is advised to move on to SFML2.
But then again, how stable is SFML2? It is not yet released and it seems some major changes are still being put in..
Which one is advised in terms of development-stability?
Thanks
-
Definitely SFML 2. It's just one (or two) major feature away from the public release, the only thing that you have to take in account is that the graphics API will change a lot.
But otherwise it's already robust enough (more than SFML 1.6).
-
We'll go with SFML2 right away then.
Thanks for the swift response!
-
I have used SDL for a long time, before I found SFML.
Actually, I made a wrapper for SDL in C++, to make it easier to use, which looked a lot like a small part of SFML.
-
is IRRLICHT some sort of wrapper for the APIs?
btw I want to teach pure OpenGL, and I posted this topic, because I want to focus on OpenGL not creating a window and messing around with it. this is one of SFML's great advantages.
Try using Qt. Setting up an openGL window is a snap.
-
i tried and it was nice, really easy to set up i still use it for some projects