From ab34b8b131eb2d60e7d22838dd6d77b98fec04b3 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Thu, 17 Sep 2026 22:07:14 +0800 Subject: [PATCH] opengl: explicitly set EGL_SURFACE_TYPE Co-authored-by: Daniel Kinzler --- src/renderer/OpenGL.zig | 5 +++++ 1 file changed, 5 insertions(+) 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,