|
| | MdlShaderGenerator (TypeSystemPtr typeSystem) |
| | Constructor. More...
|
| |
| const string & | getTarget () const override |
| | Return a unique identifier for the target this generator is for. More...
|
| |
| ShaderPtr | generate (const string &name, ElementPtr element, GenContext &context) const override |
| |
| ShaderNodeImplPtr | getImplementation (const NodeDef &nodedef, GenContext &context) const override |
| |
| string | getUpstreamResult (const ShaderInput *input, GenContext &context) const override |
| | Return the result of an upstream connection or value for an input. More...
|
| |
| GenMdlOptions::MdlVersion | getMdlVersion (GenContext &context) const |
| |
| void | emitMdlVersionNumber (GenContext &context, ShaderStage &stage) const |
| | Add the MDL file header containing the version number of the generated module. More...
|
| |
| void | emitMdlVersionFilenameSuffix (GenContext &context, ShaderStage &stage) const |
| | Add the version number suffix appended to MDL modules that use versions. More...
|
| |
| const string & | getMdlVersionFilenameSuffix (GenContext &context) const |
| | Get the version number suffix appended to MDL modules that use versions. More...
|
| |
| virtual | ~ShaderGenerator () |
| | Destructor. More...
|
| |
| virtual void | emitScopeBegin (ShaderStage &stage, Syntax::Punctuation punc=Syntax::CURLY_BRACKETS) const |
| | Start a new scope using the given bracket type. More...
|
| |
| virtual void | emitScopeEnd (ShaderStage &stage, bool semicolon=false, bool newline=true) const |
| | End the current scope. More...
|
| |
| virtual void | emitLineBegin (ShaderStage &stage) const |
| | Start a new line. More...
|
| |
| virtual void | emitLineEnd (ShaderStage &stage, bool semicolon=true) const |
| | End the current line. More...
|
| |
| virtual void | emitLineBreak (ShaderStage &stage) const |
| | Add a line break. More...
|
| |
| virtual void | emitString (const string &str, ShaderStage &stage) const |
| | Add a string. More...
|
| |
| virtual void | emitLine (const string &str, ShaderStage &stage, bool semicolon=true) const |
| | Add a single line of code, optionally appending a semicolon. More...
|
| |
| virtual void | emitComment (const string &str, ShaderStage &stage) const |
| | Add a single line code comment. More...
|
| |
| virtual void | emitBlock (const string &str, const FilePath &sourceFilename, GenContext &context, ShaderStage &stage) const |
| | Add a block of code. More...
|
| |
| virtual void | emitLibraryInclude (const FilePath &filename, GenContext &context, ShaderStage &stage) const |
| |
| template<typename T > |
| void | emitValue (const T &value, ShaderStage &stage) const |
| | Add a value. More...
|
| |
| virtual void | emitFunctionDefinition (const ShaderNode &node, GenContext &context, ShaderStage &stage) const |
| | Add the function definition for a single node. More...
|
| |
| virtual void | emitFunctionDefinitions (const ShaderGraph &graph, GenContext &context, ShaderStage &stage) const |
| | Add all function definitions for a graph. More...
|
| |
| virtual void | emitFunctionCall (const ShaderNode &node, GenContext &context, ShaderStage &stage) const |
| | Add the function call for a single node. More...
|
| |
| virtual void | emitFunctionCall (const ShaderNode &node, GenContext &context, ShaderStage &stage, bool checkScope) const |
| |
| virtual void | emitFunctionCalls (const ShaderGraph &graph, GenContext &context, ShaderStage &stage, uint32_t classification=0u) const |
| |
| virtual void | emitDependentFunctionCalls (const ShaderNode &node, GenContext &context, ShaderStage &stage, uint32_t classification=0u) const |
| |
| virtual void | emitFunctionBodyBegin (const ShaderNode &node, GenContext &context, ShaderStage &stage, Syntax::Punctuation punc=Syntax::CURLY_BRACKETS) const |
| | Emit code for starting a new function body. More...
|
| |
| virtual void | emitFunctionBodyEnd (const ShaderNode &node, GenContext &context, ShaderStage &stage) const |
| | Emit code for ending a function body. More...
|
| |
| virtual void | emitTypeDefinitions (GenContext &context, ShaderStage &stage) const |
| | Emit type definitions for all data types that needs it. More...
|
| |
| virtual void | emitInput (const ShaderInput *input, GenContext &context, ShaderStage &stage) const |
| |
| virtual void | emitOutput (const ShaderOutput *output, bool includeType, bool assignValue, GenContext &context, ShaderStage &stage) const |
| |
| virtual void | emitVariableDeclarations (const VariableBlock &block, const string &qualifier, const string &separator, GenContext &context, ShaderStage &stage, bool assignValue=true) const |
| |
| virtual void | emitVariableDeclaration (const ShaderPort *variable, const string &qualifier, GenContext &context, ShaderStage &stage, bool assignValue=true) const |
| |
| virtual bool | nodeNeedsClosureData (const ShaderNode &) const |
| | Return true if the node needs the additional ClosureData added. More...
|
| |
| const Syntax & | getSyntax () const |
| | Return the syntax object for the language used by the code generator. More...
|
| |
| void | registerImplementation (const string &name, CreatorFunction< ShaderNodeImpl > creator) |
| | Register a shader node implementation for a given implementation element name. More...
|
| |
| void | registerImplementation (const StringVec &nameVec, CreatorFunction< ShaderNodeImpl > creator) |
| | Register a shader node implementation for a given set of implementation element names. More...
|
| |
| bool | implementationRegistered (const string &name) const |
| | Determine if a shader node implementation has been registered for a given implementation element name. More...
|
| |
| void | setColorManagementSystem (ColorManagementSystemPtr colorManagementSystem) |
| | Sets the color management system. More...
|
| |
| ColorManagementSystemPtr | getColorManagementSystem () const |
| | Returns the color management system. More...
|
| |
| void | setUnitSystem (UnitSystemPtr unitSystem) |
| | Sets the unit system. More...
|
| |
| UnitSystemPtr | getUnitSystem () const |
| | Returns the unit system. More...
|
| |
| TypeSystemPtr | getTypeSystem () const |
| | Returns the type system. More...
|
| |
| const StringMap & | getTokenSubstitutions () const |
| | Return the map of token substitutions used by the generator. More...
|
| |
| virtual void | registerTypeDefs (const DocumentPtr &doc) |
| | Register type definitions from the document. More...
|
| |
| virtual void | registerShaderMetadata (const DocumentPtr &doc, GenContext &context) const |
| |
Shader generator for MDL (Material Definition Language).
Definition at line 54 of file MdlShaderGenerator.h.