public ShaderStage SetSourceCode(string Code) { Source = Code; SrcFile = null; WatchHandle = null; return(this); }
public ShaderStage SetSourceFile(string FilePath) { Source = null; SrcFile = Path.GetFullPath(FilePath); WatchHandle = FileWatcher.Watch(FilePath); return(this); }
public void UpdateIfChanged() { FileWatchHandle Handle = FileWatcher.Watch(FileName, true); if (Handle?.HasChanged ?? false) { Handle.Reset(); Parse(Handle.FullFilePath); } }