Menu

#275 Incorrect Platform on Wayland

v3.0.0
open
nobody
5
2021-04-18
2020-04-22
Vishnu
No

When using Wayland, pyOpenGL sould default to using the egl platform, but it continues to use glx. Can this be fixed via something like this:

if "wayland" in os.getenv("XDG_SESSION_TYPE", "").lower() and not os.environ.get("PYOPENGL_PLATFORM", ""):
os.environ["PYOPENGL_PLATFORM"] = "egl"

For a full discussion of the trouble that this caused, checkout:
https://sourceforge.net/p/pyopengl/mailman/pyopengl-users/thread/M5HjopY--3-2%40tutanota.com/
https://github.com/FlorianRhiem/pyGLFW/issues/49

Discussion

  • Mike C. Fletcher

    I've pushed code to attempt to address this in the develop branch on github: https://github.com/mcfletch/pyopengl which should detect wayland. Note that it also uses EGL under xwayland, though I'm not sure that is the correct path. Note also that XDG_SESSION_TYPE will often be missing if wayland wasn't started from a desktop manager, so we'll also check for WAYLAND_DISPLAY.

    Please test if this addresses your issue.

     
    • Adam Brunnmeier

      Adam Brunnmeier - 2021-04-18

      Hi @mcfletch, your change in the develop branch on github solved this issue for me (more details on https://github.com/mcfletch/pyopengl/issues/41). It's not urgent at all, but is there any reason the develop branch is not merged yet?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.