SFML community forums
Help => General => Topic started by: Lolilolight on May 20, 2014, 01:51:56 pm
-
Hi, when I try to run an SFML Program on a rapsberry pi I get this error :
failed to use xrandr extension while trying to get the desktop videos modes
I know that there is some changes to do in the /etc/config.txt file but I don't know which changes to make to do it works.
Can someone help me ?
PS : xrandr is installed.
-
This has nothing to do with SFML. You should ask on a forum specialized in Linux / Raspberry Pi.
-
Ha, ok, ty.
-
I've got the answer :
AFAIK RandR is unsupported on the Pi , use the tvservice utility instead.
It seems then that SFML is incompatible with a raspberry pi.
-
We've already made SFML work on Raspberry Pi. But it was not me so I can't answer you.
-
Harf...ok. :/
-
It seems that's it's not possible directly and that we need to use another branch of SFML :
https://github.com/Sonkun/esfml (https://github.com/Sonkun/esfml)
-
This stuff has already been merged into the master branch of the SFML repository. Just make sure that you're using a recent revision.
-
I'm using the SFML 2.1 version....
But it seems that SFML try to instanciate a glx context instead of an egl context and I don't know why.
I really need the help of someone which has already made running SFML on a pi.
-
Support for EGL and GL ES is of course not in SFML 2.1. It has been added rencently.
-
Which version should I download then ?
The most recent is on your website is SFML-2.1.
-
The Git version (https://github.com/SFML/SFML/archive/master.zip) obviously... ::)
And just to prevent yet another useless question, yes, you need to build it yourself.
-
Ha ok it's on the git-hub but it's not integrated to elsewhere yet, ok ok.
My question was so stupid. (y_y)
-
Tried to run latest master on a Raspberyy Pi with Rasbian and compilation works without problems (excluding examples).
I only get "Failed to use the XRandR extension" when connected through RDP. If I'm on Pi itself this step works, but I've still got the issue that the X11 implementation won't play nice with EGL (i.e. won't return any visual).
Edit:
Partially my bad, since I went ahead and passed -DSFML_OPENGL_ES to CMake. When compiling with OpenGL instead, it works as well. Similar to above, I only get the XRandR warning when connected through RDP, but either way I'm crashing with a segfault in GlXcreateContext().
-
I know why, maybe it's because I've xinerama. (And not xrandr)
So XrandR don't return me a warning but an error and it crash.
-
I'm just wandering if it'll work with SDL on a rapsberry pi.
If yes I think I'll use SDL rather than SFML for the "windowing".
-
That's a question for the SDL forums...
-
It works with SDL. :)
-
Good for you. You should switch your entire codebase to SDL, it works much better than SFML.
-
You know, if you had spent anytime looking at the issue tracker (https://github.com/SFML/SFML/issues/490) or well understood the current dependencies, you'd have seen that Xinerama isn't supported.
Just don't get any stupid ideas to post your SDL problems here, ok? Good.
-
It's not about Xinerama alone. I've read a bit about this recently as well and as far as I know now, the Pi doesn't have any hardware acceleration in/through X11 (probably the reason for the crashes/issues). Instead, you'd have to get an OpenGL (ES) context using other means (don't remember specifics right now), which would cause the hardware accelerated context to run "on top" of the X desktop. This would have to be implemented into SFML first. There's no way to use SFML's window/graphics modules right now out of the box.