/// <summary> /// Initializes a new instance of the <see cref="ShaderLoader"/> class. /// </summary> /// <param name="sourceManager">The source manager.</param> /// <exception cref="System.ArgumentNullException">sourceManager</exception> public ShaderLoader(ShaderSourceManager sourceManager) { if (sourceManager == null) { throw new ArgumentNullException("sourceManager"); } SourceManager = sourceManager; }
public ShaderDependencyVisitor(LoggerResult log, ShaderSourceManager sourceManager) : base(false, true) { if (log == null) throw new ArgumentNullException("log"); if (sourceManager == null) throw new ArgumentNullException("sourceManager"); this.log = log; this.sourceManager = sourceManager; }
public void Init() { // Create and mount database file system var objDatabase = ObjectDatabase.CreateDefaultDatabase(); var databaseFileProvider = new DatabaseFileProvider(objDatabase); AssetManager.GetFileProvider = () => databaseFileProvider; sourceManager = new ShaderSourceManager(); sourceManager.LookupDirectoryList.Add(@"shaders"); shaderLoader = new ShaderLoader(sourceManager); }
public void Init() { // Create and mount database file system var objDatabase = ObjectDatabase.CreateDefaultDatabase(); var databaseFileProvider = new DatabaseFileProvider(objDatabase); AssetManager.GetFileProvider = () => databaseFileProvider; manager = new ShaderSourceManager(); manager.LookupDirectoryList.Add("shaders"); logger = new SiliconStudio.Shaders.Utility.LoggerResult(); loader = new ShaderLoader(manager); }
/// <summary> /// Initializes a new instance of the <see cref="ShaderMixinParser"/> class. /// </summary> public ShaderMixinParser(IVirtualFileProvider fileProvider) { SourceManager = new ShaderSourceManager(fileProvider); var shaderLoader = new ShaderLoader(SourceManager); if (shaderLibrary == null) { shaderLibrary = new ParadoxShaderLibrary(shaderLoader); } // Create the clone context with the instances of Hlsl classes HlslSemanticAnalysis.FillCloneContext(hlslCloneContext); }
public ShaderDependencyVisitor(LoggerResult log, ShaderSourceManager sourceManager) : base(false, true) { if (log == null) { throw new ArgumentNullException("log"); } if (sourceManager == null) { throw new ArgumentNullException("sourceManager"); } this.log = log; this.sourceManager = sourceManager; }