Skip to content

Commit

Permalink
getting GLEW to work on Wayland
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pvmm committed Feb 15, 2023
1 parent d7d89f1 commit 2847757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/SDLGLVisibleSurface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char*>(
Expand Down

0 comments on commit 2847757

Please sign in to comment.