Open e00E opened 6 days ago
If you want to learn more, you can click on DisplayApiPreference
link and see for yourself.
If you have suggestions what should be there let me know, but generally, EGL is not broadly present on Windows, had long standing bugs on X11, and only worked ok on Wayland.
Also, if you want EGL for its specific features you just use glutin directly at this point.
I have read DisplayApiPreference. That documentation says the following:
But despite this issues it should be preferred on at least Linux over GLX, given that GLX is phasing away.
This means that on Linux, the default for FallbackEgl disagrees with this comment.
EGL is not broadly present on Windows
This is fine. If the default is PreferEgl, then glutin-winit will still use WGL if Egl is not available.
So I feel that on both Windows and Linux, the default PreferEgl makes more sense.
(I say this purely based on what I read in glutin. I haven't tested EGL, WGL, GLX.)
I'm not so much trying to change what the default is, but making sure that the choice is properly documented. At the moment this isn't the case.
The issue is:
Like if you know what you want, you can change default, but platform specific over cross platform default should make more sense, even though, platform specific is meh.
GLX is obsolete because of Xorg being it.
Thanks for explaining it more!
I still feel what you say here does not match the comment on DisplayApiPreference. That comment explicitly says that on Linux you should prefer egl over glx. Here you say the opposite. And the comment is missing some information you have added here.
It's up to you if and how you want to change that comment. Feel free to close the issue if you feel it's fine.
If you don't care about transparency of your window on Linux, you should pick EGL, if you don't care, you should pick EGL.
EGL is better, but it GLX didn't had a bug with transparency, so it was used as a default, so you get things more or less working consistently.
In glutin-winit the default ApiPreference is FallbackEgl. This choice should be justified with a comment. Why is not PreferEgl so that by default we pick EGL over GLX and WGL?