Skip to content

Commit

Permalink
Added workaround for GLEW on wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Mar 1, 2024
1 parent 9315254 commit c92db8b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion TheForceEngine/TFE_RenderBackend/Win32OpenGL/renderBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ namespace TFE_RenderBackend
//Sets all functions available
glewExperimental = GL_TRUE;
const GLenum err = glewInit();
if (err != GLEW_OK)
#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
}
#endif
else if (err != GLEW_OK)
{
printf("Failed to initialize GLEW");
return nullptr;
Expand Down

0 comments on commit c92db8b

Please sign in to comment.