pyopengltk
pyopengltk copied to clipboard
EGL for Wayland EGLPlatform
Issue:
- Module import fails for wayland.
- `PYOPENGL_PLATFORM=EGL` doesn't help. (Error is thrown with AND without the variable set)
Command call
$ PYOPENGL_PLATFORM='egl' python -c 'import pyopengltk'
$ python -c 'import pyopengltk'
Raw Traceback:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/.local/lib/python3.10/site-packages/pyopengltk/__init__.py", line 28, in <module>
from pyopengltk.linux import OpenGLFrame
File "/home/user/.local/lib/python3.10/site-packages/pyopengltk/linux.py", line 8, in <module>
from OpenGL import GL, GLX
File "/home/user/.local/lib/python3.10/site-packages/OpenGL/GLX/__init__.py", line 3, in <module>
from OpenGL.GLX.VERSION.GLX_1_0 import *
File "/home/user/.local/lib/python3.10/site-packages/OpenGL/GLX/VERSION/GLX_1_0.py", line 14, in <module>
from OpenGL.raw.GLX.VERSION.GLX_1_0 import *
File "/home/user/.local/lib/python3.10/site-packages/OpenGL/raw/GLX/VERSION/GLX_1_0.py", line 44, in <module>
def glXChooseVisual(dpy,screen,attribList):pass
File "/home/user/.local/lib/python3.10/site-packages/OpenGL/raw/GLX/VERSION/GLX_1_0.py", line 13, in _f
return _p.createFunction( function,_p.PLATFORM.GLX,'GLX_VERSION_GLX_1_0',error_checker=_errors._error_checker)
AttributeError: 'EGLPlatform' object has no attribute 'GLX'. Did you mean: 'GL'?
Platform information
OS: Fedora 35
Linux hidden.hostname 5.16.19-200.fc35.x86_64 #1 SMP PREEMPT Fri Apr 8 15:34:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Display server: Wayland + Sway 1.6.1
Note
Works fine with xorg + i3
I'm seeing this problem, is there any further information on this?
I didn't find a machine to reproduce. Can you run glxinfo and/or glxgears via XWayland?
glxinfo output is here: https://gist.github.com/drummondj/b002bc45a4ec5cf2197c41b6267c67b4
glxgears runs fine
So I finally found a machine running wayland. You need to do:
$ PYOPENGL_PLATFORM=glx python3 cube.py
... and it should use glx. Can you let me know if that works for you?