The main MDL SDK Interface and the unique public access point.
More...
|
namespace | mi |
| Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
|
|
The main MDL SDK Interface and the unique public access point.
◆ mi_factory()
Unique public access point to the MDL SDK API.
This factory function is the only public access point to all algorithms and data structures in the MDL SDK library. It returns a pointer to an instance of the class identified by the given UUID. Currently the function supports the following interfaces:
- an instance of the main mi::neuraylib::INeuray interface, which is used to configure,
to start up, to operate and to shut down the MDL SDK. This interface can be requested only once.
- an instance of the mi::neuraylib::IVersion class.
- Parameters
-
iid | UUID of the requested interface |
- Returns
- A pointer to an instance of the requested interface, or
NULL
if there is no interface with the requested UUID. This can happen if the library used at runtime does not match the headers used at compile time. In addition, NULL
is returned if the interface mi::neuraylib::INeuray is requested a second time.
◆ mi_neuray_factory_deprecated()
Unique public access point to the MDL SDK API.
This factory function is the only public access point to all algorithms and data structures in the MDL SDK library. It returns a pointer to an instance of the main mi::neuraylib::INeuray interface, which is used to configure, to start up, to operate, and to shut down the MDL SDK. The mi_neuray_factory_deprecated() function may be called only once. This function is deprecated. Please use mi_factory() instead.
- Parameters
-
allocator | The memory allocator to be used. This feature is not yet supported. |
version | The desired version of mi::neuraylib::INeuray. The parameter is an integer number that specifies the desired API version, which is set by default to the current API version given in the symbolic constant MI_NEURAYLIB_API_VERSION. This parameter supports the use case where an application uses an older MDL SDK API version but links with a newer MDL SDK library. In this case, the newer library can still support the older API in a binary compatible fashion. Only in rare circumstances do you need to set the API version number explicitly. |
- Returns
- A pointer to an instance of the main mi::neuraylib::INeuray interface, or
NULL
in case of failures. Possible reasons for failures are
allocator
is not NULL
,
- the valued passed for
version
is not supported by this library, or
- the function is called a second time. A typical cause for the second reason is that the library used at runtime does not match the headers used at compile time.