rust-windowing/glutin

Support XCB handles for creating GLX displays

the-argus opened this issue · 3 comments

This would require creating a new sys crate wrapper around https://xcb.freedesktop.org/manual/group__XCB__Glx__API.html I think. Would be useful so that dowstream projects (such as Slint, see this issue) don't have to include any XLib functionality in order to support all hardware.

The GLX API exported by the OpenGL drivers and the Glx protocol that can be used by XCB are unfortunately two very different things. GLX uses hardware utilities to render to X11 from the client while Glx does all of its rendering server-side.

This is fundamentally impossible. I see that EGL isn't an option for you from the link that you provided, so unfortunately using a windowing system with Xlib is your only option.

Footnote: I once tried to build a new GL implementation for my breadx Rust X11 implementation using the DRI3 libraries exported by libmesa. The resulting toil nearly drove me to alcoholism. I can't speak for the maintainers of this crate but implementing a custom GL implementation is far, far outside the scope of this crate.

Yeah, if you want xcb only then use EGL.

Oh sorry yeah that's a waste of time... I just looked up "glx xcb" and then found a link to docs and called it a day. Shows what I know. That's for explaining it @notgull