sometimes you may want to refresh CToy when saving an external file, like a GLSL shader.
Here is a simple trick to do just that thanks to the C (and GLSL) preprocessor.
To force CToy to refresh when an external file is saved, it must be included like a regular C file:
The __TINYC__ macro will make sure this trick is disabled when compiling with another compiler like GCC or VS.
And to make sure the shader will not be compiled by TCC, use the negative of the same macro in the shader:
attribute vec4 aPosition;
gl_Position = aPosition;
Now you can edit the shader files and CToy will refresh on file save.