17 #ifndef __VOP_HDACodeCompiler__
18 #define __VOP_HDACodeCompiler__
34 class opui_ScriptMaterialCodeMapper;
50 { myShaderName = shader_name; }
52 {
return myShaderName; }
64 { myForceOnOpNameConflict = flag; }
66 {
return myForceOnOpNameConflict; }
71 static bool canCompileNode(
OP_Node * srcnode );
90 virtual bool compileVexCodeToSections(
OP_Node * srcnode,
92 const char *context_mask = 0);
107 virtual bool compileNewOperatorType(
OP_Node * srcnode,
120 {
return myFunctionsSectionsMap; }
128 const char * section_name,
134 const char *details = 0);
154 bool myForceOnOpNameConflict;
177 const char *context_mask)
override;
180 static void removeVopCodeSections(
FS_IndexFile * hda );
185 bool initForVopCompilation(
OP_Node * srcnode );
190 {
return myHDAFile; }
192 {
return myVopNode; }
194 {
return myCodeGenerator; }
202 std::ostream &vex_stream);
204 bool getContextsFromMask(
const char *context_mask,
226 { myRManPath.harden( path ); }
228 {
return myRManPath; }
232 static void removeShaderCodeSections(
FS_IndexFile * file );
240 {
return myCodeGenerator; }
246 bool initForShaderCompilation(
OP_Node * srcnode );
251 virtual void getContextTypesForCompilation(
265 const char * section_name,
274 bool compilePrimaryOutputNodes(
276 opui_ScriptMaterialCodeMapper & mapper );
280 void compileMappedNodes(
282 opui_ScriptMaterialCodeMapper & mapper );
334 const char * section_name,
335 OP_Node * output_node )
override;
342 void compileAddToLibraryAndReload();
345 void compileAndAddToLibrary();
349 const char *getRenderMask()
const;
376 const char *context_mask)
override;
387 const char * section_name,
388 OP_Node * output_node )
override;
392 void compileAndAddToHDA();
395 void addInfoToHDA(
const char * mat_info );
417 bool for_network_hda,
418 const char *shader_name =
nullptr);
423 {
return myCodeCompiler; }
const UT_String & getRManPath() const
GLuint GLsizei const GLchar * message
GLuint GLsizei const GLchar * label
OP_Node * getNode() const
VOP_Node * getVopNode() const
GLsizei const GLchar *const * path
OP_OperatorTable * getTable() const
VOP_HDACodeCompiler * getCC() const
Obtain the underlying code compiler.
virtual void getContextTypesForCompilation(VOP_ContextTypeList &contexts) const =0
void setShaderName(const char *shader_name)
Main shader name used in compilation.
const UT_StringMap< UT_StringHolder > & getFunctionsSectionsMap() const
A class that compiles the encapsulated function vop code into HDA section.
bool isOK() const
Checks if there was an error during compilation up till now.
void setRManPath(const char *path)
virtual bool compileNewOperatorType(OP_Node *srcnode, const char *name, const char *label, const char *path, const char *metasrc, const VOP_ContextTypeList *types=NULL)
const UT_StringHolder & getShaderName() const
Main shader name used in compilation.
GLuint const GLchar * name
FS_IndexFile * getHDAFile() const
VOP_CodeGenerator * getCodeGenerator() const
A class that compiles a shader and saves it into an existing shader HDA.
void setForceCompilationOnOpNameConflict(bool flag)
bool getForceCompilationOnOpNameConflict()
GLsizei GLenum GLenum * types
virtual bool compileVexCodeToSections(OP_Node *srcnode, FS_IndexFile *hda, const char *context_mask=0)
VOP_CodeGenerator * getCodeGenerator() const
virtual void doCompile(FS_IndexFile *hda, VOP_CodeGenerator *code_generator, VOP_ContextType context_type, const char *section_name, OP_Node *output_node)=0