|
|
|
|
|
by sly010
2611 days ago
|
|
> Wayland is just a protocol, and a pretty simple one to boot. For a Wayland client to render using hardware acceleration, it has to link to an OpenGL library (typically mesa, specifically EGL to set up the OpenGL context). Mesa (a library written in C) links to libwayland-client (also written in C). The problem is that mesa is expecting a pointer to a C struct that is defined in libwayland-client. It will cast that pointer and call libwayland-client functions. Mesa could have been written to use a different level of abstraction (e.g. take a struct of function pointers) it would be possible to wire it up with your own wayland library. It doesn't help that libwayland-client was designed to be stateful (since the protocol itself it stateful). So, while technically you can write a wayland client without using libwayland-client, you cannot create an OpenGL context without rewriting mesa. You also cannot link directly or indirectly with ANY libraries that use libwayland-client. So people give in, use C, and move their abstraction layers higher up in the stack. Edit: grammar. |
|