Search Results for

    Show / Hide Table of Contents

    Class Parser

    Shader files meta data processing tool

    Inheritance
    IShaderParser
    Parser
    Inherited Members
    ITokenReadersContainerBase::_childReaders
    ITokenReadersContainerBase::ProcessChildren(const Token& token, IShaderParser* parser)
    IShaderParser::~IShaderParser()
    ITokenReadersContainerBase::~ITokenReadersContainerBase()
    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
    IShaderParser::Failed()

    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
    IShaderParser::GetFeatureLevel()

    GetMacros()

    Gets the parser macros.

    Declaration
    public virtual ParserMacros GetMacros() const override
    Returns
    ParserMacros

    The macros

    Overrides
    IShaderParser::GetMacros()

    GetReader()

    Gets source code reader

    Declaration
    public virtual Reader GetReader() override
    Returns
    Reader

    Source code reader

    Overrides
    IShaderParser::GetReader()

    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
    IShaderParser::OnError(const String& message)

    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
    IShaderParser::OnWarning(const String& message)

    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

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat