Open 3D Engine Atom Gem API Reference 24.09.2
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
PassCanvas::PassGraphCompiler Class Reference

#include <PassGraphCompiler.h>

Inherits AtomToolsFramework::GraphCompiler.

Public Member Functions

 AZ_RTTI (PassGraphCompiler, "{4D9407B1-195A-404A-B97A-E2BA22207C87}", AtomToolsFramework::GraphCompiler)
 
 AZ_CLASS_ALLOCATOR (PassGraphCompiler, AZ::SystemAllocator)
 
 AZ_DISABLE_COPY_MOVE (PassGraphCompiler)
 
 PassGraphCompiler (const AZ::Crc32 &toolId)
 
AZStd::string GetGraphPath () const
 
bool CompileGraph (GraphModel::GraphPtr graph, const AZStd::string &graphName, const AZStd::string &graphPath) override
 Dysfunction initiates and executes the graph compile, changing states accordingly.
 
- Public Member Functions inherited from AtomToolsFramework::GraphCompiler
 AZ_RTTI (GraphCompiler, "{D79FA3C7-BF5D-4A23-A3AB-1D6733B0C619}")
 
 AZ_CLASS_ALLOCATOR (GraphCompiler, AZ::SystemAllocator)
 
 AZ_DISABLE_COPY_MOVE (GraphCompiler)
 
 GraphCompiler (const AZ::Crc32 &toolId)
 
virtual bool Reset ()
 
virtual void SetStateChangeHandler (StateChangeHandler handler)
 
virtual void SetState (State state)
 Assign the current graph compiler state.
 
virtual State GetState () const
 Get the current graph compiler state.
 
virtual const AZStd::vector< AZStd::string > & GetGeneratedFilePaths () const
 Returns a list of all the files generated during the last compile.
 
virtual bool CanCompileGraph () const
 Returns true if the graph is in a state that can be aborted or restarted to reinitiate a new compile.
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from AtomToolsFramework::GraphCompiler
static void Reflect (AZ::ReflectContext *context)
 
static bool IsCompileLoggingEnabled ()
 Returns the value of a registry setting that enables or disables verbose logging for the compilation process.
 

Additional Inherited Members

- Public Types inherited from AtomToolsFramework::GraphCompiler
enum class  State : uint32_t {
  Idle = 0 , Compiling , Processing , Complete ,
  Canceled , Failed
}
 Values representing the state of compiler as it processes the graph data.
 
using StateChangeHandler = AZStd::function<void(const GraphCompiler*)>
 Assign the current graph compiler state.
 
- Protected Member Functions inherited from AtomToolsFramework::GraphCompiler
void ReportStatus (const AZStd::string &statusMessage)
 
bool ReportGeneratedFileStatus ()
 
- Protected Attributes inherited from AtomToolsFramework::GraphCompiler
const AZ::Crc32 m_toolId = {}
 
GraphModel::GraphPtr m_graph
 
AZStd::string m_graphName
 
AZStd::string m_graphPath
 
AZStd::vector< AZStd::string > m_generatedFiles
 
AZStd::mutex m_lastStatusMessageMutex
 
AZStd::string m_lastStatusMessage
 
AZStd::atomic< Statem_state = State::Idle
 
StateChangeHandler m_stateChangeHandler
 
const AZ::Uuid m_assetReportRequestId = AZ::Uuid::CreateRandom()
 

Detailed Description

PassGraphCompiler traverses a pass graph, searching for and splicing shader code snippets, variable values and definitions, and other information into complete, functional pass types, passes, and shaders. Currently, the resulting files will be generated an output into the same folder location has the source graph.

Member Function Documentation

◆ CompileGraph()

bool PassCanvas::PassGraphCompiler::CompileGraph ( GraphModel::GraphPtr graph,
const AZStd::string & graphName,
const AZStd::string & graphPath )
overridevirtual

Dysfunction initiates and executes the graph compile, changing states accordingly.

Reimplemented from AtomToolsFramework::GraphCompiler.

◆ GetGraphPath()

AZStd::string PassCanvas::PassGraphCompiler::GetGraphPath ( ) const
virtual

Returns the path that was passed into the compiled graph function unless overridden to provided different value. Generated files will be saved to the same folder as this path.

Reimplemented from AtomToolsFramework::GraphCompiler.


The documentation for this class was generated from the following file: