Class Parser
Shader files meta data processing tool
Inheritance
Namespace: ShaderProcessing
Assembly: FlaxEngine.dll
File: Engine/ShadersCompilation/Parser/ShaderProcessing.h
Syntax
public class Parser : public ShaderProcessing::IShaderParser, public ShaderProcessing::ITokenReadersContainerBase
Methods
Failed()
Gets value indicating that shader processing operation failed
Declaration
public virtual bool Failed() const override
Returns
bool
True if shader processing failed, otherwise false |
Overrides
GetFeatureLevel()
Gets the parser feature level of the target platform graphics backend.
Declaration
public virtual FeatureLevel GetFeatureLevel() const override
Returns
FeatureLevel
The graphics feature level |
Overrides
GetMacros()
Gets the parser macros.
Declaration
public virtual ParserMacros GetMacros() const override
Returns
ParserMacros
The macros |
Overrides
GetReader()
Gets source code reader
Declaration
public virtual Reader GetReader() override
Returns
Reader
Source code reader |
Overrides
OnError(const String& message)
Event send to the parser on reading shader source code error
Declaration
public virtual void OnError(const String& message) override
Parameters
String
message
Message to send |
Overrides
OnWarning(const String& message)
Event send to the parser on reading shader source code warning
Declaration
public virtual void OnWarning(const String& message) override
Parameters
String
message
Message to send |
Overrides
Process(const String& targetName, const char* source, int32 sourceLength, ParserMacros macros, FeatureLevel featureLevel, ShaderMeta* result)
Process shader source code and generate metadata
Declaration
public static bool Process(const String& targetName, const char* source, int32 sourceLength, ParserMacros macros, FeatureLevel featureLevel, ShaderMeta* result)
Parameters
String
targetName
Calling object name (used for warnings/errors logging) |
char
source
ANSI source code |
int32
sourceLength
Amount of characters in the source code |
ParserMacros
macros
The input macros. |
FeatureLevel
featureLevel
The target feature level. |
ShaderMeta
result
Output result with metadata |
Returns
bool
True if cannot process the file (too many errors), otherwise false |
Process(ShaderMeta* result)
Process shader source code and generate metadata
Declaration
public void Process(ShaderMeta* result)
Parameters
ShaderMeta
result
Output result with metadata |