Class ShaderPreprocessor
This class processes shader stage files in order the combine them into a single string.
public class ShaderPreprocessor
- Inheritance
-
ShaderPreprocessor
- Inherited Members
Constructors
ShaderPreprocessor(IEnumerable<string>, IEnumerable<string>, IEnumerable<string>, Dictionary<string, string>, string?)
Creat an instance of the shader preprocessor.
public ShaderPreprocessor(IEnumerable<string> allowedExtensions, IEnumerable<string> disallowedExtensions, IEnumerable<string> includePath, Dictionary<string, string> macros, string? glslVersion)
Parameters
allowedExtensionsIEnumerable<string>List of allowed extensions.
disallowedExtensionsIEnumerable<string>List of disallowed extensions.
includePathIEnumerable<string>Include file search path.
macrosDictionary<string, string>Defined macros.
glslVersionstringShader language version.
Methods
Begin()
Begin processing a new chain of files.
public void Begin()
Finish(out string, List<InfoLogItem>)
Finish processing files and shaders.
public void Finish(out string shader, List<ShaderPreprocessor.InfoLogItem> infoLog)
Parameters
shaderstringThe final shader.
infoLogList<ShaderPreprocessor.InfoLogItem>The shader preprocessor info log.
ProcessFile(FileInfo)
Process a file.
public void ProcessFile(FileInfo file)
Parameters
fileFileInfoThe file to process.