Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML 2.0 Networking and the Raspberry Pi  (Read 3233 times)

0 Members and 1 Guest are viewing this topic.

Tau Sodan

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML 2.0 Networking and the Raspberry Pi
« on: January 06, 2013, 04:14:27 pm »
I just checked out the git and was able to compile sfml-networking (& its dependency sfml-system) on the Raspberry Pi. I had to comment out some lines in various CMakeLists.txt's though. Namely, anything related to opengl, X11 and audio. But, that's it. I don't have time for testing it atm. But, that shouldn't be too far in the future.

That said, all of sfml 1.6 is in the repo for the Pi. Not sure what they did to make it work. But, it gives hope :)

At any rate, I just thought I'd report my minor success.

Tau Sodan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML 2.0 Networking and the Raspberry Pi
« Reply #1 on: August 15, 2013, 06:52:44 pm »
So, a while back someone asked how I got the system and networking modules to compile on the Pi. I tried it again just now and it still works.

git clone https://github.com/SFML/SFML.git 2.1

Edit src/SFML/CMakeLists.txt. Comment out the add_subdirectory for Window, Graphics and Audio lines.

Proceed with the normal:

cmake -G ...
make

And that should compile and link successfully.

Rhimlock

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: SFML 2.0 Networking and the Raspberry Pi
« Reply #2 on: August 16, 2013, 09:27:54 am »
You should be able to compile it without any problems when you run "apt-get build-deb libsfml-dev" before running cmake.

That will pull all dependencies for SFML 1.6 in debian withouth installing SFML 1.6. Even libglx (which will be useless on an ARM-Platform like the RPi, since you would nee EGL instead of GLX).



Sonkun ported SFML to GLES:

https://github.com/Sonkun/esfml

There is also the branch which will be used for the SFML-Android-Support.


Right now there is a bug for ESFML which doesn't prevent it from compiling, but any Project you link against it will throw an error.
EglContext.hpp is missing an new Function (SelectBestVisual) that was implemented in GlxContext. And WindowImplX11.cpp only tries to call GlxContext.
I managed to get around this problem but it's rather dirty and not the best solution. (I just use the first XVisualInfo instead of calculation the best, since the functions in EGL are not the same as in GLX).
But it runs and in can draw textured triangles :-)
You will need libgles1 and libegl.

stuartr

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: SFML 2.0 Networking and the Raspberry Pi
« Reply #3 on: September 18, 2013, 12:00:49 am »
Just to add one for Tau - worked exactly as described. Happily working through sfml networking examples on a rpi.

Thank you Tau and, as it's my first post here, thank you to Laurent et al.