-
-
Notifications
You must be signed in to change notification settings - Fork 351
Compile on Linux
sudo apt install git build-essential cmake xorg-dev libglu1-mesa-dev libncurses5-dev libncursesw5-dev
For 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-dev
For supporting thumbnails creation of 3D models through GlslViewer:
sudo apt install xvfb
sudo 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-dev
sudo 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 -v
For video support (using FFMpeg library LIBAV), also do:
sudo dnf install ffmpeg ffmpeg-devel
For supporting thumbnails creation of 3D models through GlslViewer:
sudo yum install xorg-x11-server-Xvfb
sudo pacman -S glu ncurses
For video support (using FFMpeg library LIBAV), also do:
sudo pacman -S ffmpeg
For supporting thumbnails creation of 3D models through GlslViewer:
sudo pacman -S xorg-server-xvfb
git clone https://github.com/patriciogonzalezvivo/glslViewer.git
cd glslViewer
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make
sudo make install
Note: 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 install
Note 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=1
Note 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.
Aborted
Means 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/card1
Add 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:
glslScreenSaver
Note: If you are new to glsl shader you probably want to take a look to https://thebookofshaders.com/ to learn how to code them