You can just spin up an EGL context with no surface. Something like this: https://github.com/swaywm/wlroots/blob/master/render/egl.c With EGL_PLATFORM_SURFACELESS_MESA