In Blender we plan to support Wayland and headless rendering. We want a single executable and USD library to work on systems that have X11, Wayland, both or neither installed.
For this USD is missing two things:
EGL support in addition to GLX, as both Wayland and headless rendering only work with EGL.
Ability for the USD library to not link to OpenGL or X11 libraries.
We're willing to contribute improvements to USD and OpenSubdiv for this, but would like some feedback on the best approach.
From what I understand, USD links to X11 libraries only to support debug windows for tests. Possible solutions:
Add a build option to disable these tests without disabling OpenGL.
Split the garch module so that only the tests have to link to X11 and the USD library does not.
For loading GL, GLX and EGL systems dynamically, possible solutions:
Extend glApi to support loading extensions through EGL, and add support for dynamically loading EGL and GLX symbols.
My preference would be to use libepoxy since we already use it in Blender, it meets the requirements and implementing all this in glApi would be rather complicated. However it would of course add a new (optional) dependency.
I realized glApi is part of the public USD API, which makes using a library like libepoxy difficult. There may be some way to forward the symbols but it's looking messy.
In Blender we plan to support Wayland and headless rendering. We want a single executable and USD library to work on systems that have X11, Wayland, both or neither installed.
For this USD is missing two things:
We're willing to contribute improvements to USD and OpenSubdiv for this, but would like some feedback on the best approach.
From what I understand, USD links to X11 libraries only to support debug windows for tests. Possible solutions:
garch
module so that only the tests have to link to X11 and the USD library does not.For loading GL, GLX and EGL systems dynamically, possible solutions:
glApi
to support loading extensions through EGL, and add support for dynamically loading EGL and GLX symbols.glApi
.My preference would be to use libepoxy since we already use it in Blender, it meets the requirements and implementing all this in
glApi
would be rather complicated. However it would of course add a new (optional) dependency.