Just released a dead-nuts simple class for live shader coding in openFrameworks. The class utilizes watchman to notify you of changes to files within a certain directory—useful for externally editing shader files and seeing your changes reflected as soon as you hit save. Currently tested on macOS, but should work on any other OS that can build watchman & its dependencies.
Let me know if you guys have any suggestions, or (even better) submit a pull request! Cheers, and happy shading!
Hi. thanks for sharing.
did you took a look at ofxAutoReloadedShader? It does exactly the same but it uses Poco instead for monitoring the file system. Also its implementation is 100%compatible with ofxShader.
Hope this helps somehow.
Ah wow, scouring the forum/ofxaddons/general internet somehow never yielded that addon for me! Lol well now there is just another option I guess. The watchman client is kind of nice because you can just subscribe to notifications that get sent when the file system changes, as opposed to reloading on a timer. So there are subtle differences that are probably imperceivable.
Also, you can use my addon for purposes beyond reloading shaders. Since my watchman implementation will pattern match files based on regular expressions, you can use this to watch for any file(s) being created/deleted/changed and perform some action based on that.
Thanks for pointing this out, though. Really surprised I missed that!
I see. The regex option sounds really nice.
next time also search in ofxaddons.com