Skip to content

Commit c9ff080

Browse files
committed
Fix glew init issue when using on Wayland
1 parent 92e1899 commit c9ff080

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/Processing.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3630,7 +3630,12 @@ void PApplet::run(){
36303630
glewExperimental = GL_TRUE;
36313631
glewExperimental = GL_TRUE;
36323632
GLenum glewErr = glewInit();
3633+
#ifdef linux
3634+
if(glewErr != GLEW_OK && getenv("WAYLAND-DISPLAY") != nullptr && glewErr != GLEW_ERROR_NO_GLX_DISPLAY){
3635+
#else
36333636
if(glewErr != GLEW_OK){
3637+
#endif
3638+
36343639
#ifdef _WIN32
36353640
char msg[256]; snprintf(msg,sizeof(msg),"glewInit() failed: %s", glewGetErrorString(glewErr));
36363641
MessageBoxA(NULL, msg, "processing-cpp Error", MB_OK|MB_ICONERROR);

0 commit comments

Comments
 (0)