Duality.Resources.AbstractShader.LoadSource C# (CSharp) Method

LoadSource() public method

Loads new shader source code from the specified file.
public LoadSource ( string filePath = null ) : void
filePath string The path of the file to read the source code from.
return void
        public void LoadSource(string filePath = null)
        {
            if (filePath == null) filePath = this.sourcePath;

            this.compiled = false;
            this.sourcePath = filePath;
            this.source = "";
            if (!File.Exists(this.sourcePath)) return;

            this.source = File.ReadAllText(this.sourcePath);
        }

Same methods

AbstractShader::LoadSource ( Stream stream ) : void