Skip to content

Commit

Permalink
Added workaround for GLEW on wayland (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 authored Mar 1, 2024
1 parent 2f79f25 commit 341db34
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ namespace TFE_RenderBackend
//Sets all functions available
glewExperimental = GL_TRUE;
const GLenum err = glewInit();
#if defined(GLEW_ERROR_NO_GLX_DISPLAY) && !defined(_WIN32)
if (err == GLEW_ERROR_NO_GLX_DISPLAY &&
strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0)
{
// workaround for GLEW on Wayland
// see https://github.com/nigels-com/glew/issues/172
}
else
#endif
if (err != GLEW_OK)
{
printf("Failed to initialize GLEW");
Expand Down

0 comments on commit 341db34

Please sign in to comment.