From e0c73347caf0de2afbe81fdb98105a64291140b6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 16 Jun 2025 22:20:08 +0200 Subject: [PATCH] egl: fix EGL crash on nvidia (createPlatformWindowSurface fail) createPlatformWindowSurface fails and returns NO_SURFACE which aborts the program. Nvidia doesn't seem to support EGL_BUFFER_SIZE 32 with opengl es, and it seems like we dont need it anyways? --- egl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/egl.c b/egl.c index 8621504..0ca0f54 100644 --- a/egl.c +++ b/egl.c @@ -747,9 +747,9 @@ EglPickConfig (void) EGLint visual_id; /* We want the best framebuffer configuration that supports at least - 8 bits of alpha, red, green, and blue. */ + 8 bits of red, green, and blue. */ egl_config_attribs[0] = EGL_BUFFER_SIZE; - egl_config_attribs[1] = 32; + egl_config_attribs[1] = 24; egl_config_attribs[2] = EGL_RED_SIZE; egl_config_attribs[3] = 8; egl_config_attribs[4] = EGL_GREEN_SIZE; @@ -757,7 +757,7 @@ EglPickConfig (void) egl_config_attribs[6] = EGL_BLUE_SIZE; egl_config_attribs[7] = 8; egl_config_attribs[8] = EGL_ALPHA_SIZE; - egl_config_attribs[9] = 8; + egl_config_attribs[9] = 0; /* We want OpenGL ES 2 or later. */ egl_config_attribs[10] = EGL_RENDERABLE_TYPE;