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
allowedExtensions
IEnumerable<string>List of allowed extensions.
disallowedExtensions
IEnumerable<string>List of disallowed extensions.
includePath
IEnumerable<string>Include file search path.
macros
Dictionary<string, string>Defined macros.
glslVersion
stringShader 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
shader
stringThe final shader.
infoLog
List<ShaderPreprocessor.InfoLogItem>The shader preprocessor info log.
ProcessFile(FileInfo)
Process a file.
public void ProcessFile(FileInfo file)
Parameters
file
FileInfoThe file to process.