SFML community forums

Bindings - other languages => C => Topic started by: CryGnix on May 21, 2015, 06:22:33 am

Title: Question about CSFML
Post by: CryGnix on May 21, 2015, 06:22:33 am
I have looked around and I found SFML intriguing, so I have some question about the C-binding. Can I achieve the same results with CSFML as with SFML (Framerate etc)? Would I loose essential features related to SFML if I use C instead of C++.
And where is the best place to learn CSFML, I have been using SDL for quite a while if that helps me in the process of learning CSFML. And also, I have one of the SFML books from Packtpub (But it is in C++, so don't know if that will help with CSFML).

Thank you for your time :)
Title: Re: Question about CSFML
Post by: Nexus on May 21, 2015, 01:39:37 pm
I have looked around and I found SFML intriguing, so I have some question about the C-binding. Can I achieve the same results with CSFML as with SFML (Framerate etc)? Would I loose essential features related to SFML if I use C instead of C++.
Features and performance should be the same. The C binding is usually updated with a delay, so you may not have access to the latest changes.

What you would lose are features related to the programming language. SFML makes use of higher-level C++ abstractions, like class inheritance, templates, function and operator overloading -- techniques like these have to be implemented differently in C.

Your questions sounds like you have the choice of either C or C++... And unless you have strong reasons in favor of C, I would recommend C++, as it's much more comfortable and requires less code to achieve the same. But the language is also more complex, so you need considerably more time to learn it...