SFML for the Raspberry Pi (w/ hardware accelerated graphics and no X dependency)
C++ Objective-C++ CMake Objective-C Other
Switch branches/tags
Nothing to show
Clone or download
mickelson Merge pull request #5 from ppelleti/multitouch
support multitouch on Raspberry Pi
Latest commit 4211313 May 8, 2018



SFML on the Raspberry Pi with hardware graphics and no X11 dependency.


Step 1: Install the SFML dependencies

sudo apt-get install cmake libflac-dev libogg-dev libvorbis-dev libopenal-dev libjpeg8-dev libfreetype6-dev libudev-dev libraspberrypi-dev

Step 2: Build SFML-Pi

  • From the source directory for sfml-pi, run cmake with the '-DSFML_RPI=1' parameter.
  • Once cmake runs successfully, compile using 'sudo make install' and then 'sudo ldconfig'
  • The commands should look something like this:
mkdir build
cd build
cmake .. -DSFML_RPI=1 -DEGL_INCLUDE_DIR=/opt/vc/include -DEGL_LIBRARY=/opt/vc/lib/libbrcmEGL.so -DGLES_INCLUDE_DIR=/opt/vc/include -DGLES_LIBRARY=/opt/vc/lib/libbrcmGLESv2.so
sudo make install
sudo ldconfig

Note: if you are using a Pi firmware older than 1.20160921-1, please replace "libbrcmEGL.so" and "libbrcmGLESv2" with the old names, "libEGL.so" and "libGLESv2".

That's it! You should now be able to use SFML on your raspberry pi with hardware accelerated graphics and no need to be running X.

More Info

Please consult the SFML readme for more info: [readme.txt][]

SFML logo

SFML — Simple and Fast Multimedia Library

SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.



You can get the latest official release on SFML's website. You can also get the current development version from the Git repository.


Follow the instructions of the tutorials, there is one for each platform/compiler that SFML supports.


There are several places to learn SFML:


SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the contribution guidelines.