Looking at some past threads and the official documentation seems to indicate that GLFW does not support headless mode rendering. However, GLFW does seem to support OSMesa and EGL. Does this mean that if I use EGL and OSMesa together, I can bypass X11 completely and render in headless mode? I tried to compile GLFW using this configuration but did not seem to compile.
OSMesa is supported, there are some dependencies required:
@tovacinni - and if you use OSMesa then you do not need to use EGL. OSMesa provides its own functions to create GL context. Also I hope you understand that you won’t get and GPU acceleration with OSMesa - that is purely software rendering with GL API.
If you want real GPU accelerated GL context without X11/Wayland, then you need to look into using EGL over DRM. There was glfw pull request some time ago that implemented this: https://github.com/glfw/glfw/pull/786 There was also newer pull request https://github.com/glfw/glfw/pull/1608 But I don’t know which one works or is better.
Thanks for the pointers. EGL over DRM sounds like exactly what we need- is there any reason why those pull requests have not been merged yet? Is headless rendering via EGL over DRM a feature that is planned to be supported by GLFW?