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

Author Topic: How to activate xrandr on a rapsberrypi to run SFML ???  (Read 6402 times)

0 Members and 1 Guest are viewing this topic.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
How to activate xrandr on a rapsberrypi to run SFML ???
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #1 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.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #2 on: May 20, 2014, 02:25:48 pm »
Ha, ok, ty.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #3 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.






Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #4 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.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #5 on: May 21, 2014, 12:05:10 pm »
Harf...ok. :/

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #6 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


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #7 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.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #8 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #9 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.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #10 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10838
    • View Profile
    • development blog
    • Email
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #11 on: May 21, 2014, 01:54:17 pm »
The Git version obviously... ::)
And just to prevent yet another useless question, yes, you need to build it yourself.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #12 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)

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #13 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().
« Last Edit: May 21, 2014, 03:47:06 pm by Mario »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: How to activate xrandr on a rapsberrypi to run SFML ???
« Reply #14 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.