SFML community forums
Help => General => Topic started by: kotrunga on April 22, 2019, 10:20:27 pm
-
I know that via the CSFML page: https://www.sfml-dev.org/download/csfml/ (https://www.sfml-dev.org/download/csfml/) there are no docs on the SFML api for C, as it's essentially the same as the C++ one.
However, are there any resources out there for using SFML with C? I need some help...
For example, what if I want to make the example provided here https://www.sfml-dev.org/tutorials/2.5/start-linux.php (https://www.sfml-dev.org/tutorials/2.5/start-linux.php) in C on a Mac?
I don't want to use XCode, and don't want to use C++, only C.
1) First, how would I translate the SFML "api" calls to valid calls in C? I can read C and C++, but not sure where I would access sf::CircleShape, for example, as obviously C doesn't have inheritance.
2) How would I build this with C?
Hopefully these questions make sense... sorry, a newbie here!
Thanks for the help.
-
Although I haven't used SFML with C, I believe it's the same as with C++ but without the double colon separator to make a single name.
e.g. sf::CircleShape becomes sfCircleShape
It seems that there is some documentation with the CSFML source code (https://github.com/SFML/CSFML/tree/master/doc).
-
This is pretty disappointing. Couldn't the README here at least contain a couple of examples of how to call the C SFML binding? https://github.com/SFML/CSFML/blob/master/readme.txt
Is the intention literally that everyone must use trial and error?