The X11 backend for baseview currently creates OpenGL contexts using GLX.
While it should be kept for compatibility, GLX is a legacy API, tied to the (even-more-legacy) Xlib API which has a bunch of safety footguns, and is also slower due to routing many things through the X server.
EGL meanwhile completely sidelines the X server and interfaces directly to kernel APIs, which makes it lighter and more performant. It is also getting better driver support compared to GLX (although GLX is still fine for now).
We should add an EGL backend and make it the default for creating OpenGL contexts on X11, and only fall back to GLX if EGL is not available for some reason.
The X11 backend for baseview currently creates OpenGL contexts using GLX.
While it should be kept for compatibility, GLX is a legacy API, tied to the (even-more-legacy) Xlib API which has a bunch of safety footguns, and is also slower due to routing many things through the X server.
EGL meanwhile completely sidelines the X server and interfaces directly to kernel APIs, which makes it lighter and more performant. It is also getting better driver support compared to GLX (although GLX is still fine for now).
We should add an EGL backend and make it the default for creating OpenGL contexts on X11, and only fall back to GLX if EGL is not available for some reason.