Hi there folks, I'm running pyopengl 3.1.6 on Debian Bookworm (aka Testing). I'm running in to a problem on Wayland:
$ python3 -c 'from OpenGL.GLUT import *'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/OpenGL/GLUT/__init__.py", line 5, in <module>
from OpenGL.GLUT.fonts import *
File "/usr/lib/python3/dist-packages/OpenGL/GLUT/fonts.py", line 20, in <module>
p = platform.getGLUTFontPointer( name )
File "/usr/lib/python3/dist-packages/OpenGL/platform/baseplatform.py", line 350, in getGLUTFontPointer
raise NotImplementedError(
NotImplementedError: Platform does not define a GLUT font retrieval function
The issue happens only on Wayland (which now uses EGL), and only if I don't force the platform to GLX:
$ echo $XDG_SESSION_TYPE
wayland
$ python3 -c 'from OpenGL.GLUT import *'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/OpenGL/GLUT/__init__.py", line 5, in <module>
from OpenGL.GLUT.fonts import *
File "/usr/lib/python3/dist-packages/OpenGL/GLUT/fonts.py", line 20, in <module>
p = platform.getGLUTFontPointer( name )
File "/usr/lib/python3/dist-packages/OpenGL/platform/baseplatform.py", line 350, in getGLUTFontPointer
raise NotImplementedError(
NotImplementedError: Platform does not define a GLUT font retrieval function
$ PYOPENGL_PLATFORM=x11 python3 -c 'from OpenGL.GLUT import *; print("no problem")'
no problem
The problem is not present in 3.1.5, because the older platform detection code there does not try to detect Wayland and so chooses GLX (which works) instead of EGL (which fails):
Hi there folks, I'm running pyopengl 3.1.6 on Debian Bookworm (aka Testing). I'm running in to a problem on Wayland:
The issue happens only on Wayland (which now uses EGL), and only if I don't force the platform to GLX:
Looking at
OpenGL.platform.egl
, there is indeed nogetGLUTFontPointer()
function, unlike inOpenGL.platform.glx
where the function does exist.The problem is not present in 3.1.5, because the older platform detection code there does not try to detect Wayland and so chooses GLX (which works) instead of EGL (which fails):
3.1.5:
3.1.6: