Sure! It took me a while to figure everything out - so here is a short guide in case more people are interested.
I’m running shader files with glslViewer on Raspberry Pi OS Lite (Buster). With this configuration you only have a command line interface (and the glslViewer window) so no resources are wasted on the windows manager.
From the command line, shaders can be run full screen like so:
glslViewer shader.frag
How to get there:
SSH
I find it easy to SSH into the Pi, because then you can easily copy/paste shader code from your main computer.
Prepare the image
Using the imager prepare Raspberry Pi OS Lite (Legacy - Buster).
In the imager, use shift+cmd+x (or similar depending on your OS) to show the advanced options. Make sure the hostname is set and SSH is enabled, and configure wifi.
Compile glslViewer
After booting up the Pi, follow the steps here - if you are on OS Lite, you need the steps for no X11.
On the compile step, use the following make command:
cmake -DNO_X11=TRUE -DFORCE_GBM=TRUE ..
(the manual reads as if you should use either one of the arguments, but you should use both)
Configuration
In the final step of the previous section you are told to make sure some lines are uncommented in the /boot/config.txt
file. In addition to those lines, make sure to have the this uncommented as well (to enable the composite video out):
sdtv_mode=2
And you can set a smaller frame buffer size, which should improve performance:
framebuffer_width=320
framebuffer_height=240
Finally run
sudo raspi-config
And under ‘Advanced options’ set the GL Driver to G2 GL (Fake KMS).
Test
Reboot the Pi and you should be ready to go. Some examples are included in the glslViewer repo.