Use GLSL/video to shade your desktop
Use Homebrew to install them:
$ brew install ffmpegMake sure the git submodules was updated:
git submodule update --init --recursiveCompile shared libraries and install:
$ cd extern/FFmpeg && \
mkdir build && \
./configure --prefix=$(pwd)/build --disable-doc --disable-programs --disable-static --enable-shared && \
make -j8 && \
make installThe installation directory should be extern/FFmpeg/build.
If compilation complains nasm/yasm not found or too old., you can use brew to install nasm or yasm, and try again.
In order to include and link FFmpeg correctly, there are two options you need to specify, or just use the defaults:
FFmpeg_INCLUDE: default is/opt/homebrew/includeFFmpeg_LIB: default is/opt/homebrew/lib
and make sure FFmpeg shared libraries(.ddl for Windows, .dylib for macOS, .so for Linux) are included your path.
Config CMake from project root directory:
$ cmake . -B build -DFFmpeg_INCLUDE=<ffmpeg_include_path> -DFFmpeg_LIB=<ffmpeg_lib_path>For example:
- if you install FFmpeg with Homebrew,
<ffmpeg_include_path>could be$(brew --prefix)/include, and<ffmpeg_lib_path>could be$(brew --prefix)/lib; - if you install FFmpeg from source code,
<ffmpeg_include_path>could be$(pwd)/extern/FFmpeg/build/include, and<ffmpeg_lib_path>could be$(pwd)/extern/FFmpeg/build/lib.
Then compile:
$ cmake --build build -j 8 --config ReleaseExecutable file will be placed in bin folder.
Print help message:
$ ./bin/ShadeYourDesktop -h
Usage:
ShadeYourDesktop [options]
Available options:
-V, --video Video file name
--fs Fragment shader file name
--t0 texture 0 file name
--t1 texture 1 file name
--t2 texture 2 file name
--t3 texture 3 file name
-h, --help Help messageUse video as wallpaper:
$ ./bin/ShadeYourDesktop --video <your_video_path>Use GLSL to shade your desktop:
$ ./bin/ShadeYourDesktop --fs <GLSL_file> --t0 <your_image_file_for_texture_0>