-
-
Notifications
You must be signed in to change notification settings - Fork 368
Compile on Linux
sudo apt install git build-essential cmake xorg-dev libglu1-mesa-dev libncurses5-dev libncursesw5-devFor video support (using FFMpeg library LIBAV), also do:
sudo apt install ffmpeg libavcodec-dev libavcodec-extra libavfilter-dev libavfilter-extra libavdevice-dev libavformat-dev libavutil-dev libswscale-dev libv4l-dev libjpeg-dev libpng-dev libtiff-devFor supporting thumbnails creation of 3D models through GlslViewer:
sudo apt install xvfbsudo apt install git cmake xorg-dev libglu1-mesa-dev libncurses5-dev libncursesw5-dev sudo apt install git cmake libgbm-dev libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libncurses5-dev libncursesw5-dev libxcb-randr0-devsudo dnf install git gcc-c++ cmake mesa-libGLU-devel libXi-devel libXxf86vm-devel libXrandr-devel libXinerama-devel libXcursor-devel ncurses-compat-libs ncurses-static libatomic
sudo yum install libXdamage-devel ncurses-devel
sudo ldconfig -vFor video support (using FFMpeg library LIBAV), also do:
sudo dnf install ffmpeg ffmpeg-develFor supporting thumbnails creation of 3D models through GlslViewer:
sudo yum install xorg-x11-server-Xvfbsudo pacman -S glu ncurses For video support (using FFMpeg library LIBAV), also do:
sudo pacman -S ffmpegFor supporting thumbnails creation of 3D models through GlslViewer:
sudo pacman -S xorg-server-xvfbgit clone https://github.com/patriciogonzalezvivo/glslViewer.git
cd glslViewer
git submodule init
git submodule updatemkdir build
cd build
cmake ..
make
sudo make installNote: If you are installing in WSL2, other users have pointed to this article as a useful resource
mkdir build
cd build
cmake -DNO_X11=TRUE ..
make
sudo make installNote 1: Newer RaspberryPi distribution do have BROADCOM drivers but work only on DRM for that use -DFORCE_DRM=TRUE instead.
Note 2: If you are using GBM make sure on your /boot/config.txt you have the following lines present and/or un-commented:
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
hdmi_force_hotplug=1Note 3:: If you get this error:
Unable to get DRM resources
Unable to get DRM resources
Unable to get DRM resources
Fail to initialize EGL context from display /dev/dri/card0 try another.
glslViewer: glslViewer/deps/vera/src/window.cpp:645: int vera::initGL(WindowProperties): Assertion `EGL_FALSE != result' failed.
AbortedMeans it's using the wrong display. Raspberry Pi 4 and up have two of them you need to use the other through the -d or --display arguments to /dev/dri/card1. Like this
glslViewer test.frag -d /dev/dri/card1Add GlslScreenSaver to run at the beginning of your session. Here you have two options:
Run gnome-session-properties, Click on Add and then fill the following data
Name: GlslScreenSaver
Command: glslScreenSaver daemon
Should look like this

Or run gnome-tweaks, Click on Startup Applications then the + button and search for glslScreenSaver.

If you want to customize your own screensaver shaders copy /usr/share/glslViewer/glslScreenSaver.yaml to your home folder ~/.glslScreenSaver.yaml. Then edit it to choose how much time and what shader (o list of shaders) should run:
cp /usr/share/glslViewer/glslScreenSaver.yaml ~/.glslScreenSaver.yaml
nano ~/.glslScreenSaver.yaml- Duplicate any of the default shaders under
~/.glslScreenSaver/ - Edit it with your favorite code editor and then add it to
~/.glslScreenSaver.yaml - Try it out by running:
glslScreenSaverNote: If you are new to glsl shader you probably want to take a look to https://thebookofshaders.com/ to learn how to code them