The Sokol libraries are a set of simple STB-style cross-platform libraries written in C. It provides us with all the functionality we need to write GUI applications that run on Windows, Linux, MacOS and WebAssembly. Sokol also supports iOS and Android, but I decided to ignore native builds for mobile platforms. A big motivation to use these libraries is the WebAssembly support, it allows us to compile the examples for the web and provide live demos.
Sokol comes with a simple 3D-API wrapper with support for multiple backends: GLES2/WebGL, GLES3/WebGL2, GL3.3, D3D11 and Metal. The shaders are written in GLSL v450 and cross-compiled to other shader dialects using sokol-shdc. Under the hood sokol-shdc uses glslang, SPIRV-tools and SPIRV-Cross for compiling the shader first from GLSL to SPIR-V and then from SPIR-V to the target shader dialect.
For the live demos I took a lot of inspiration from the sokol samples website. I copied most of the webpage generator and template code from that project, making some small adjustments to style and layout.
This project is still a work in progress and will be updated regularly. In the meantime you can find live demos of all implemented examples at the link below: