Skip to content
Patricio Gonzalez Vivo edited this page Jul 20, 2022 · 24 revisions

1. Install dependencies

Ubuntu

sudo apt install git 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

RaspberryPi OS (with X11/Wayland Window Manager)

sudo apt install git cmake xorg-dev libglu1-mesa-dev libncurses5-dev libncursesw5-dev 

RaspberryPi OS (without X11/Wayland Window Manager)

sudo apt install git cmake libgbm-dev libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libncurses5-dev libncursesw5-dev 

Fedora

sudo dnf install git gcc-c++ cmake mesa-libGLU-devel libXi-devel libXxf86vm-devel
sudo yum install libXdamage-devel ncurses-devel

For video support (using FFMpeg library LIBAV), also do:

sudo dnf install ffmpeg ffmpeg-devel

Arch

sudo pacman -S glu ncurses

For video support (using FFMpeg library LIBAV), also do:

sudo pacman -S ffmpeg

2. Clone repository and submodules

git clone https://github.com/patriciogonzalezvivo/glslViewer.git
cd glslViewer
git submodule init
git submodule update

3. Compile

For any Linux X11 environment (uses of GLFW 3.0)

mkdir build
cd build
cmake ..
make
sudo make install

For NO X11 context (uses BROADCOM legacy drivers or GBM on Raspberry PI v4)

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 GBM for that use -DFORCE_GBM=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