patriciogonzalezvivo / glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
BSD 3-Clause "New" or "Revised" License
4.62k stars 351 forks source link

Issue on X11 fedora 34. #214

Open basta opened 3 years ago

basta commented 3 years ago

Something I faced and solved. When compiling according to instructions I ended up with glfw that expected wayland, when calling glslViewer i got an error like: glfw: Wayland: No display detected, or something similiar. I needed to compile glfw manually and then recompile glslViewer. Not sure what to do with this info, but I thought it might help other fedora people.

The problem might have been with glslViewer. Because glxgears worked and I think that uses glfw? Not sure

I should probably note that f34 uses wayland by default, so maybe it has something to do with that

patriciogonzalezvivo commented 3 years ago

@basta thanks so much for share this findings! Do you mind making a note or updating the documentation on the wiki?

basta commented 3 years ago

Sure thing, I am just worried that it's not a common problem. Not sure if I have some weird configuration.

Also, I have to add, since I have you here: Thanks so much for all your work, on the Book of Shaders and everything, you made me find a new passion for shaders

patriciogonzalezvivo commented 3 years ago

Oh man! thanks so much! your words means a lot

Good point about this maybe a edge case. Let's live it here. If it pops again for more people we can write something. I don't use fedora but wayland slowly becoming the standard could bring more of this kind of issues

basta commented 3 years ago

Very well then. Let's wait. I think that google will lead people here anyway, if they google the error

patriciogonzalezvivo commented 3 years ago

Hi @basta! I'm doing some housekeeping and moving things around a bit for 1.7.0 release. One of the big steps is adding LIBAV support by default in Linux and MacOS. For that ffmpeg and libav dev packages need to install as well. Do you mind cloning main branch (I just switch it as the default), and see if the wiki instractions here are to date?

basta commented 3 years ago

Seems ok. Downloaded the dependencies and compiled the main branch and all seems to work. Haven't tested any special features though. Shaders can output audio as well right? Maybe I should test that as Fedora now uses Pipewire instead of Pulseaudio. If you think that testing that is useful and could point me to a shader that produces audio I can test that as well.

patriciogonzalezvivo commented 3 years ago

No, the othe way around. Audio stream gets converted into a texture, to do audio reactive shaders https://github.com/patriciogonzalezvivo/glslViewer/tree/main/examples/2D/06_audio

Thanks for checking!!

rivenirvana commented 3 years ago

Just encountered this as well and looked into it. I believe this is because the specfile that builds the RPM for glfw in the official Fedora repos has -DGLFW_USE_WAYLAND=ON as a cmake build option, because of Wayland being default now. That means there is no other workaround for X11 Fedora users other than to compile glfw manually with the correct build configuration, or if someone packages a different RPM of glfw for X11.

glfw specfile used by Fedora, line 77 Relevant commit