septag / rizz

Small C game development framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hot reloading of shader doesn't seem to work on macOS

zacharycarter opened this issue · comments

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

  1. Clone repo
  2. Build using Cmake
  3. Run ./rizz --run lib08-draw3d.dylib from the bin directory
  4. Change the assignment statement in the fragment shader draw3d.frag for frag_color to something like - frag_color = vec4(1.0, 0.0, 0.0, 1.0);
  5. 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.