Hot reloading of shader doesn't seem to work on macOS
zacharycarter opened this issue · comments
Tail Wag Games commented
I've tried to recompile a shader on macOS while rizz is running a game plugin, and this causes an assert to fail in dmon.h. Here are the steps to reproduce
- Clone repo
- Build using Cmake
- Run
./rizz --run lib08-draw3d.dylib
from thebin
directory - Change the assignment statement in the fragment shader
draw3d.frag
forfrag_color
to something like -frag_color = vec4(1.0, 0.0, 0.0, 1.0);
- Re-compile the sgs file using the following command -
./tools/darwin/glslcc --vert=examples/08-draw3d/draw3d.vert --frag=examples/08-draw3d/draw3d.frag --lang=msl --reflect --sgs --output=examples/assets/shader s/msl/draw3d.sgs
This will cause the following assertion to fail -
Assertion failed: (strstr(abs_filepath, watch->rootdir) == abs_filepath), function dmon__fsevent_callback, file /Users/zacharycarter/dev/rizz/include/dmon/dmon.h, line 1347.