Class BaseGraphicsPass

Synopsis

#include <Source/Falcor/RenderGraph/BasePasses/BaseGraphicsPass.h>

class dlldecl BaseGraphicsPass

Description

No description yet.

Inheritance

Decsendents: FullScreenPass, RasterPass, RasterScenePass

Methods

BaseGraphicsPassCreate a new object.
~BaseGraphicsPass
addDefineAdd a define
getProgramGet the program
getRootVar
getStateGet the state
getVarsGet the vars
removeDefineRemove a define
setVarsSet a vars object

Source

Lines 35-77 in Source/Falcor/RenderGraph/BasePasses/BaseGraphicsPass.h.

class dlldecl BaseGraphicsPass
{
public:
    virtual ~BaseGraphicsPass() = default;
    /** Add a define
    */
    void addDefine(const std::string& name, const std::string& value = "", bool updateVars = false);
    /** Remove a define
    */
    void removeDefine(const std::string& name, bool updateVars = false);
    /** Get the program
    */
    GraphicsProgram::SharedPtr getProgram() const { return mpState->getProgram(); }
    /** Get the state
    */
    const GraphicsState::SharedPtr& getState() const { return mpState; }
    /** Get the vars
    */
    const GraphicsVars::SharedPtr& getVars() const { return mpVars; }
    ShaderVar getRootVar() const { return mpVars->getRootVar(); }
    /** Set a vars object. Allows the user to override the internal vars, for example when one wants to share a vars object between different passes.
        \param[in] pVars The new GraphicsVars object. If this is nullptr, then the pass will automatically create a new GraphicsVars object
    */
    void setVars(const GraphicsVars::SharedPtr& pVars);
protected:
    /** Create a new object.
        \param[in] progDesc The program description.
        \param[in] programDefines List of macro definitions to set into the program. The macro definitions will be set on all shader stages.
        \return A new object, or an exception is thrown if creation failed.
    */
    BaseGraphicsPass(const Program::Desc& progDesc, const Program::DefineList& programDefines);
    GraphicsVars::SharedPtr mpVars;
    GraphicsState::SharedPtr mpState;
};





Add Discussion as Guest

Log in to DocsForge