|
openwallpaper
|
Repository contains some small scenes that demonstrate OpenWallpaper API usage.
To build examples yourself, you will need to install:
Clone the repository:
Set WASM_CC environment variable to your WASM C compiler path. If you have installed wasi-sdk to /opt/wasi-sdk, then the compiler is located in /opt/wasi-sdk/bin/clang.
Then you can build examples with shell scripts:
Resulting .owf files will be in corresponding example directories.
Draws a triangle in the center of the screen, classic example of graphics API usage. You can see an explanation of how this code works in Drawing a triangle developer guide section.
Demonstrates how to run shader wallpapers (e.g. from ShaderToy) in OpenWallpaper. Shader that was ported is Singularity by @XorDev.
Draws a static image, simplest example of texture rendering. Original image is Scarlett Tree from KDE Plasma 6 artwork.
Draws particles to create a rain-like effect. An example of using instanced rendering to draw a lot of similar objects efficiently.
Example of using ow_get_audio_spectrum to visualize audio. It gets spectrum data and draws it as white bars on the screen, without any preprocessing.