WiggyBennett
Posts: 1
Joined: Tue Dec 20, 2016 3:06 pm

RPiGL Installation problem

Tue Dec 20, 2016 3:23 pm

Hey everyone!

I have a Raspberry Pi 3 Model B. Running Raspian. I'm currently going through a learn python book, so forgive me if I have forgotten something

I'm trying to use RPi GL which i downloaded from from https://github.com/stephanh42/rpigl

I installed using the following commands (From the book)

Code: Select all

unzip rpigl-master.zip
cd rpigl-master
python3 setup.py build
sudo python3 setup.py build
As far as I can tell everything installed properly (No errors)
When I run python3 on the bumpedspere.py (demo code) I get the following error
libEGL warning: DRI2: failed to authenticate
Traceback (most recent call last):
File "bumpedspere.py", line 153, in <module>
MyWindow(640, 640, pygame.RESIZABLE).run()
File "/usr/local/lib/python3.4/dist-packages/rpigl/glesutils.py", line 906, in __init__
window = create_opengl_window(width, height, flags)
File "/usr/local/lib/python3.4/dist-packages/rpigl/rpi_egl.py", line 233, in create_opengl_window
window = rpi_create_window(2, attribList)
File "/usr/local/lib/python3.4/dist-packages/rpigl/rpi_egl.py", line 197, in rpi_create_window
window.create_EGL_context(gl_version, attrib_list)
File "/usr/local/lib/python3.4/dist-packages/rpigl/rpi_egl.py", line 169, in create_EGL_context
raise Exception("cannot create window surface")
Exception: cannot create window surface

I've tried reinstalling and googling for any common problems but I can't find any

I'd be grateful for any help you could give me!

ralpher01
Posts: 1
Joined: Thu Feb 09, 2017 11:34 pm

Re: RPiGL Installation problem

Thu Feb 09, 2017 11:41 pm

Hello WiggyBennet. I too have the Raspberry Pi 3 Model B, Running Raspian and I am also currently going through a learn python book. I recently encountered the same problem that you have with RPiGl. When I run the bumpedspere.py file I get the same error as you did. Have you found a solution to this problem? If so, it would be greatly appreciated if you could help me out.

thedigitalempress
Posts: 1
Joined: Fri Dec 01, 2017 3:55 am

Re: RPiGL Installation problem

Fri Dec 01, 2017 4:03 am

Hi,

I am also having the same issue and completing project out of the same book as well. I have actually left an issue open on GitHub. I see the code hasn't been updated in 5 years so I thinking there is a compatibility issue. Going to keep looking at it myself to see if I can fix it in the meantime.

nosrev
Posts: 3
Joined: Thu Aug 16, 2018 6:42 am

Re: RPiGL Installation problem

Wed Aug 22, 2018 7:55 pm

Hi guys,
i know the response is kind of late. Just came across this, since I am also trying to use rpigl. Maybe it can help other people who come across this problem in the feature.

Code: Select all

Exception: cannot create window surface
The error is related to rpigl not finding the GLESv2 and EGL library. When you try to run the code directly on the RPi (in desktop mode and not via ssh) you should receive a different and more meaningful error:

Code: Select all

warning: DRI2: failed to authenticate
When googling this you are able to find more useful hints, like this one https://pi3d.github.io/html/FAQ.html#gl ... thenticate, that finally got me to the solution.

Quick and dirty fix is to replace some code in rpigl/rpigl/rpi_egl.py line 67f to:

Code: Select all

gles_lib = ctypes.CDLL('/opt/vc/lib/libbrcmGLESv2.so')
egl_lib = ctypes.CDLL('/opt/vc/lib/libbrcmEGL.so')
If I have some more time I will make a more generic push request on github.

Cheers.

tony987
Posts: 1
Joined: Wed Aug 22, 2018 7:53 pm
Contact: Website

Re: RPiGL Installation problem

Wed Aug 22, 2018 8:00 pm

I was also installing the Raspberrypi model 2.3 version and the installation did not happen because the same error also happened to me also. The error has to be fixed and for that, I am looking for the solution but did not find that either.
https://epsonsupports.net/epson-iprint-app-support/

Return to “Troubleshooting”