Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IMdl_compiler Class Referenceabstract

The MDL compiler allows to register builtin modules. More...

Inheritance diagram for mi::neuraylib::IMdl_compiler:
mi::base::Interface_declare< 0x8fff0a2d, 0x7df7, 0x4552, 0x92, 0xf7, 0x36, 0x1d, 0x31, 0xc6, 0x30, 0x08 > mi::base::IInterface

Public Member Functions

virtual Sint32 add_builtin_module (const char *module_name, const char *module_source)=0
 Adds a builtin MDL module. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x8fff0a2d, 0x7df7, 0x4552, 0x92, 0xf7, 0x36, 0x1d, 0x31, 0xc6, 0x30, 0x08 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x8fff0a2d, 0x7df7, 0x4552, 0x92, 0xf7, 0x36, 0x1d, 0x31, 0xc6, 0x30, 0x08 >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

The MDL compiler allows to register builtin modules.

Member Function Documentation

virtual Sint32 mi::neuraylib::IMdl_compiler::add_builtin_module ( const char *  module_name,
const char *  module_source 
)
pure virtual

Adds a builtin MDL module.

Builtin modules allow to use the native() annotation which is not possible for regular modules. Builtin modules can only be added before the first regular module has been loaded.

Note
After adding a builtin module it is still necessary to load it using mi::neuraylib::IMdl_impexp_api::load_module() before it can actually be used.
Parameters
module_nameThe fully-qualified MDL name of the MDL module (including package names, starting with "::").
module_sourceThe MDL source code of the module.
Returns
  • 0: Success.
  • -1: Possible failure reasons: invalid parameters (NULL pointer), module_name is not a valid module name, failure to compile the module, or a regular module has already been loaded.