Ejemplo n.º 1
0
        /// <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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
        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;
        }