Skip to content

EstevanBR/SwiftSFML

Repository files navigation

Swift

SwiftSFML

This project provides Swift bindings for SFML.

The project depends on CSFML 2.6.1 (which depends on SFML 2.6.1).

You might need to build it from source depending on your platform.

The SFML and CSFML Headers (.h / .hpp) and Libraries (.so or .a on Linux) should exist in standard paths, such as /usr/local/include/, and /usr/local/lib/ respectively.

Getting SFML and CSFML

Linux

  • You can download SFML 2.6.1 here
  • CSFML 2.6.0 was harder to find for Linux, so I built it from source.
  • put the contents of the include/ folder for both CSFML and SFML somewhere your compiler find it; /usr/local/include works for me.
  • put the contents of the lib/ folder for both CSFML and SFML somewhere your linker will find it; /usr/local/lib works for me.

macOS

  • You can CSFML 2.6.1 from the Github Releases Page, or build it from source.
  • You can get SFML 2.6.1 from the Github Releases Page, or build it from source, you can also get it via brew install sfml@2
  • As of the time of writing, you can check the swift.yml ci file for a working macOS setup.

Windows

  • I have not tested this on Windows at all.

Demos

Pong

See Pong implementation in: Sources/Pong/

make pong

image

SFML Demo from the website

Based on the tutorial from the SFML website - SFML and Linux

See Demo implementation in: Sources/Demo/

make demo

image

JoystickInputReader

See JoystickInputReader implementation in: Sources/JoystickInputReader

make joystick

image

Building Documentation

make docs
make preview-swiftsfml-docs
make preview-csfml-docs

License

MIT for this repository. SFML and any redistributed upstream components remain under their own licenses.

SFML is licensed under the zlib/libpng license.

https://www.sfml-dev.org/

About

SwfitSFML - Swift Bindings for SFML

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages