Shade it! - Shadertoy viewer/editor
Start with shader hash to autodownload json and assets
or Drag and Drop from Shadertoy.com or Drag and Drop json from assets/glsl/st/
Stores json and screenshots in assets folder.
Middle mouse button to switch shader.
Press n to create new shader, will open in Editor
If file is changed and saved it should autocompile, press c to do that manually.
Adjust your editor before compiling:
#define EDITOR "/usr/bin/kate"
P to toggle rendering/pause.
S to override screenshot.
ESC to quit.
SDL2 Image is very easy to replace, like with Stb_image.
For a cross-platform build:
I don't really aim for a multi-platform build, but I am not against that either.
Due the lack of time/money (development ressources) I don't do that. Feel free to commit/fork or raise an issue.
Since inotify and epoll are used for the autocompile feature, you either need to get rid of the feature or look for a proper substitution.
I think libcurl and jansson are pretty much portable, some POSIX-features are used and I call system with chmod to set attributes, which isn't neccesary under most circumstances.
At the moment I work on FFT to make the fragment shaders audio responsive.
WebGL 2.0 / OpenGL ES 3.0 has tons of new features and the shadertoy-team has done a lot of work, I am unsure if I can keep up with all the features in the future, but I think this code isn't the worst boilerplate.
A detailed ToDo-List will be submitted.