SFML community forums

Help => General => Topic started by: Lolilolight on May 20, 2014, 01:51:56 pm

Title: How to activate xrandr on a rapsberrypi to run SFML ???
Post 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.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on May 20, 2014, 01:57:24 pm
This has nothing to do with SFML. You should ask on a forum specialized in Linux / Raspberry Pi.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 20, 2014, 02:25:48 pm
Ha, ok, ty.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 11:34:24 am
I've got the answer :

Quote
AFAIK RandR is unsupported on the Pi , use the tvservice utility instead.

It seems then that SFML is incompatible with a raspberry pi.





Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on May 21, 2014, 11:57:21 am
We've already made SFML work on Raspberry Pi. But it was not me so I can't answer you.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 12:05:10 pm
Harf...ok. :/
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 12:12:23 pm
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)

Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on May 21, 2014, 12:18:47 pm
This stuff has already been merged into the master branch of the SFML repository. Just make sure that you're using a recent revision.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 12:22:57 pm
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.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on May 21, 2014, 12:38:25 pm
Support for EGL and GL ES is of course not in SFML 2.1. It has been added rencently.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 01:49:04 pm
Which version should I download then ?

The most recent is on your website is SFML-2.1.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: eXpl0it3r on May 21, 2014, 01:54:17 pm
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.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 21, 2014, 01:56:43 pm
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)
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Mario on May 21, 2014, 03:16:51 pm
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().
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on May 28, 2014, 09:05:48 pm
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.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on June 05, 2014, 11:34:56 am
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".
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on June 05, 2014, 11:42:04 am
That's a question for the SDL forums...
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Lolilolight on June 05, 2014, 01:32:11 pm
It works with SDL. :)
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Laurent on June 05, 2014, 01:37:59 pm
Good for you. You should switch your entire codebase to SDL, it works much better than SFML.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: eXpl0it3r on June 05, 2014, 02:08:49 pm
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.
Title: Re: How to activate xrandr on a rapsberrypi to run SFML ???
Post by: Mario on June 05, 2014, 02:45:25 pm
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.