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

MDL backends allow to transform compiled material instances or function calls into target code. More...

Inheritance diagram for mi::neuraylib::IMdl_backend:
mi::base::Interface_declare< 0x9ecdd747, 0x20b8, 0x4a8a, 0xb1, 0xe2, 0x62, 0xb2, 0x62, 0x30, 0xd3, 0x67 > mi::base::IInterface

Public Member Functions

virtual Sint32 set_option (const char *name, const char *value)=0
 Sets a backend option. More...
 
virtual Sint32 set_option_binary (const char *name, const char *data, Size size)=0
 Sets a binary backend option. More...
 
virtual const Uint8get_device_library (Size &size) const =0
 Returns the representation of a device library for this backend if one exists. More...
 
virtual const ITarget_codetranslate_environment (ITransaction *transaction, const IFunction_call *call, const char *fname, IMdl_execution_context *context)=0
 Transforms an MDL environment function call into target code. More...
 
virtual const ITarget_codetranslate_material_expression (ITransaction *transaction, const ICompiled_material *material, const char *path, const char *fname, IMdl_execution_context *context)=0
 Transforms an expression that is part of an MDL material instance to target code. More...
 
virtual const ITarget_codetranslate_material_df (ITransaction *transaction, const ICompiled_material *material, const char *path, const char *base_fname, IMdl_execution_context *context)=0
 Transforms an MDL distribution function to target code. Note that currently this is only supported for BSDFs. For a BSDF it results in four functions, suffixed with "_init", "_sample", "_evaluate" and "_pdf". More...
 
virtual const ITarget_codetranslate_material (ITransaction *transaction, const ICompiled_material *material, Target_function_description *function_descriptions, Size description_count, IMdl_execution_context *context)=0
 Transforms (multiple) distribution functions and expressions of a material to target code. For each distribution function this results in four functions, suffixed with "_init", "_sample", "_evaluate", and "_pdf". Functions can be selected by providing a list of Target_function_descriptions. Each of them needs to define the path, the root of the expression that should be translated. After calling this function, each element of the list will contain information for later usage in the application, e.g., the argument_block_index and the function_index. More...
 
virtual ILink_unitcreate_link_unit (ITransaction *transaction, IMdl_execution_context *context)=0
 Creates a new link unit. More...
 
virtual const ITarget_codetranslate_link_unit (const ILink_unit *lu, IMdl_execution_context *context)=0
 Transforms a link unit to target code. More...
 
virtual const ITarget_codedeserialize_target_code (const IBuffer *buffer, IMdl_execution_context *context) const =0
 Restores an instance of ITarget_code from a buffer. Deserialization can fail for outdated input date, which is not an error. Check the context messages for details. More...
 
virtual const ITarget_codedeserialize_target_code (const Uint8 *buffer_data, Size buffer_size, IMdl_execution_context *context) const =0
 Restores an instance of ITarget_code from a buffer. Deserialization can fail for outdated input date, which is not an error. Check the context messages for details. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x9ecdd747, 0x20b8, 0x4a8a, 0xb1, 0xe2, 0x62, 0xb2, 0x62, 0x30, 0xd3, 0x67 >
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< 0x9ecdd747, 0x20b8, 0x4a8a, 0xb1, 0xe2, 0x62, 0xb2, 0x62, 0x30, 0xd3, 0x67 >
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

MDL backends allow to transform compiled material instances or function calls into target code.