From 28477579c7450b510e62bdef7e65ba777a789dff Mon Sep 17 00:00:00 2001 From: Pedro de Medeiros Date: Wed, 15 Feb 2023 13:23:37 -0300 Subject: [PATCH] getting GLEW to work on Wayland GLEW fails to initialise because there is no GLX on wayland and the one provided by distros is build to use GLX over EGL. This PR ignores the GLEW_ERROR_NO_GLX_DISPLAY error and it is the temporary fix until this is fixed by GLEW upstream, see nigels-com/glew#172 --- src/video/SDLGLVisibleSurface.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDLGLVisibleSurface.cc b/src/video/SDLGLVisibleSurface.cc index c84279d937..d3b352e16c 100644 --- a/src/video/SDLGLVisibleSurface.cc +++ b/src/video/SDLGLVisibleSurface.cc @@ -84,7 +84,7 @@ SDLGLVisibleSurface::SDLGLVisibleSurface( // Initialise GLEW library. GLenum glew_error = glewInit(); - if (glew_error != GLEW_OK) { + if (glew_error != GLEW_OK && glew_error != GLEW_ERROR_NO_GLX_DISPLAY) { throw InitException( "Failed to init GLEW: ", reinterpret_cast(