HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_ShaderHDACompilerOTL Class Reference

#include <VOP_HDACodeCompiler.h>

+ Inheritance diagram for VOP_ShaderHDACompilerOTL:

Public Member Functions

 VOP_ShaderHDACompilerOTL ()
 Constructor. More...
 
bool compileNewOperatorType (OP_Node *srcnode, const char *name, const char *label, const char *path, const char *metasrc, const VOP_ContextTypeList *types=nullptr) override
 
- Public Member Functions inherited from VOP_ShaderHDACompiler
 VOP_ShaderHDACompiler ()
 Constructor. More...
 
void setRManPath (const char *path)
 
const UT_StringgetRManPath () const
 
- Public Member Functions inherited from VOP_HDACodeCompiler
 VOP_HDACodeCompiler ()
 
virtual ~VOP_HDACodeCompiler ()
 
virtual bool compileVexCodeToSections (OP_Node *srcnode, FS_IndexFile *hda, const char *context_mask=0)
 
const UT_StringMap
< UT_StringHolder > & 
getFunctionsSectionsMap () const
 
void setShaderName (const char *shader_name)
 Main shader name used in compilation. More...
 
const UT_StringHoldergetShaderName () const
 Main shader name used in compilation. More...
 
UT_ErrorSeverity getStatus (UT_String &message, UT_String *details=0)
 
void setForceCompilationOnOpNameConflict (bool flag)
 
bool getForceCompilationOnOpNameConflict ()
 

Protected Member Functions

void getContextTypesForCompilation (VOP_ContextTypeList &contexts) const override
 Obtains the context types for which to compile the code. More...
 
void doCompile (FS_IndexFile *hda, VOP_CodeGenerator *code_generator, VOP_ContextType context_type, const char *section_name, OP_Node *output_node) override
 Compiles the given context type of the source node to the HDA in OTL. More...
 
- Protected Member Functions inherited from VOP_ShaderHDACompiler
bool initForShaderCompilation (OP_Node *srcnode)
 Sets up member variables to be ready for compilation. More...
 
bool compilePrimaryOutputNodes (FS_IndexFile *hda, opui_ScriptMaterialCodeMapper &mapper)
 
void compileMappedNodes (FS_IndexFile *hda, opui_ScriptMaterialCodeMapper &mapper)
 
OP_NodegetNode () const
 
VOP_CodeGeneratorgetCodeGenerator () const
 
OP_OperatorTablegetTable () const
 
- Protected Member Functions inherited from VOP_HDACodeCompiler
void saveVflCodeToSection (FS_IndexFile *hda, OP_Node *shader_node, VOP_CodeGenerator *code_generator, VOP_ContextType context_type, const char *section_name, OP_Node *output_node)
 Saves the code to section. More...
 
bool isOK () const
 Checks if there was an error during compilation up till now. More...
 
void setStatus (UT_ErrorSeverity sev, const char *msg, const char *details=0)
 
void clearStatus ()
 

Additional Inherited Members

- Static Public Member Functions inherited from VOP_ShaderHDACompiler
static void removeShaderCodeSections (FS_IndexFile *file)
 Utility function for cleaning up HDA of any compiled sections. More...
 
- Static Public Member Functions inherited from VOP_HDACodeCompiler
static bool canCompileNode (OP_Node *srcnode)
 
static void removeCodeSections (OP_Node *node, FS_IndexFile *file)
 
static bool updateCodeSections (OP_Node *node, FS_IndexFile *file, UT_String *message)
 

Detailed Description

A class that compiles a shader into a new script-based shader HDA (ie, u no contents network) and saves it in OTL.

Definition at line 297 of file VOP_HDACodeCompiler.h.

Constructor & Destructor Documentation

VOP_ShaderHDACompilerOTL::VOP_ShaderHDACompilerOTL ( )

Constructor.

Member Function Documentation

bool VOP_ShaderHDACompilerOTL::compileNewOperatorType ( OP_Node srcnode,
const char *  name,
const char *  label,
const char *  path,
const char *  metasrc,
const VOP_ContextTypeList types = nullptr 
)
overridevirtual

Compiles a given node to a new script-based HDA (ie, the content nodes are not saved; only the vex code that they generate is saved) This is used for HDAs that don't have contents network, and only use the compiled code for cooking.

Parameters
srcnodeThe node from which to create the new HDA.
nameThe name of the new operator.
labelThe label of the new operator.
pathThe file path of the OTL to which the new HDA is saved.
metasrcThe meta source for the OTL containing new HDA.
typesThe shader context types to save. If NULL, all implemented context types are saved.
Returns
True if creation of new HDA succeeded. On failure, false is returned and the member error message is set.

Reimplemented from VOP_HDACodeCompiler.

void VOP_ShaderHDACompilerOTL::doCompile ( FS_IndexFile hda,
VOP_CodeGenerator code_generator,
VOP_ContextType  context_type,
const char *  section_name,
OP_Node output_node 
)
overrideprotectedvirtual

Compiles the given context type of the source node to the HDA in OTL.

Implements VOP_ShaderHDACompiler.

void VOP_ShaderHDACompilerOTL::getContextTypesForCompilation ( VOP_ContextTypeList contexts) const
overrideprotectedvirtual

Obtains the context types for which to compile the code.

Implements VOP_ShaderHDACompiler.


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