diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index 31e9df4f2..fea0e4201 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -59,6 +59,11 @@ pub fn init(alloc: Allocator, opts: rendererpkg.Options) !OpenGL { // Choose a config. We need a config that is renderable with // OpenGL and a RGBA8 color buffer. const config = egl.Config.choose(display, &.{ + // EGL_SURFACE_TYPE defaults to EGL_WINDOW_BIT even though + // we are rendering exclusively through surfaceless mode. + // This is no problem on Mesa but we need to specify this + // explicitly for proprietary Nvidia drivers. + egl.c.EGL_SURFACE_TYPE, 0, egl.c.EGL_RENDERABLE_TYPE, egl.c.EGL_OPENGL_BIT, egl.c.EGL_RED_SIZE, 8, egl.c.EGL_GREEN_SIZE, 8,