You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we have a working flow for getting glscopeclient to run under Wayland, perhaps using xwayland? If so, please submit a PR to scopehal-docs with instructions on how to get this working.
Keeping this issue open and tagged for the v1.0 release because I want better native Wayland compatibility long term.
azonenberg
changed the title
glscopeclient fails to run on Fedora under Wayland due to GLEW init failure
glscopeclient fails to run under Wayland due to GLEW init failure
Apr 28, 2021
Over at the GLEW repo, nigels-com/glew#172, the supertux folks reports that GLEW seems to be usable even if glewInit returns GLEW_ERROR_NO_GLX_DISPLAY.
I can start glscopeclient and display the waveforms for the demo device, if I make this modification:
diff --git a/src/glscopeclient/WaveformArea.cpp b/src/glscopeclient/WaveformArea.cpp
index e68601b..d8dfc09 100644
--- a/src/glscopeclient/WaveformArea.cpp
+++ b/src/glscopeclient/WaveformArea.cpp
@@ -504,7 +504,7 @@ void WaveformArea::on_realize()
//Initialize GLEW
GLenum glewResult = glewInit();
- if (glewResult != GLEW_OK)
+ if (glewResult != GLEW_OK && glewResult != 4)
{
string err =
"glscopeclient was unable to initialize GLEW and cannot continue.\n"
The Glew maintainer said that he would expose glewContextInit in the public API which would allow for both EGL and GLX to be used (if I understood him correctly). But that was back in 2018 and no such change has been committed.
I guess we can use the glew-patch that supertux uses: supertuxkart/stk-code@961ac4d, but then we'd have to package our own version of glew.
Or we can check for $XDG_SESSION_TYPE == wayland and in that case ignore GLEW_ERROR_NO_GLX_DISPLAY? I'll google a bit to check what is the most reliable way of detecting if a program is running under wayland.
glewInit returns GLEW_ERROR_NO_GLX_DISPLAY. Seems like something is looking for GLX when we're using Wayland and things bork.
The text was updated successfully, but these errors were encountered: