MDL SDK API nvidia_logo_transpbg.gif Up
mdl_distiller_plugin.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
4
7
8#ifndef MDL_DISTILLER_PLUGIN_H
9#define MDL_DISTILLER_PLUGIN_H
10
12#include <mi/base/plugin.h>
13#include <mi/base/types.h>
14#include <mi/base/ilogger.h>
15
19
20namespace mi { namespace neuraylib { class IPlugin_api; } }
21namespace mi { namespace mdl { class IRule_matcher_event; } }
22
23namespace mi {
24namespace mdl {
25
27#define MI_DIST_MDL_DISTILLER_PLUGIN_TYPE "mdl_distiller v2"
28
31public:
35 virtual const char* get_name() const = 0;
36
39 virtual mi::Size get_api_version() const = 0;
40
44 virtual bool init( mi::base::ILogger* logger) = 0;
45
49 virtual bool exit() = 0;
50
52 virtual mi::Size get_target_count() const = 0;
53
55 virtual const char* get_target_name( mi::Size index) const = 0;
56
79 mi::mdl::IRule_matcher_event* event_handler,
81 mi::Size target_index,
82 Distiller_options* options,
83 mi::Sint32* p_error) const = 0;
84
91 virtual mi::Size get_required_module_count(mi::Size target_index) const = 0;
92
101 virtual const char *get_required_module_code(mi::Size target_index, mi::Size module_index) const = 0;
102
111 virtual const char *get_required_module_name(mi::Size target_index, mi::Size module_index) const = 0;
112};
113
114} // namespace mdl
115
116} // namespace mi
117
118#endif // MDL_DISTILLER_PLUGIN_H
The ILogger interface class supports logging of messages.
Definition: ilogger.h:194
The abstract base class for plugins.
Definition: plugin.h:34
Options class to hold all parameters for algorithm and rule customizations.
Definition: mdl_distiller_options.h:15
The rule engine handles the transformation of a compiled material by a rule set.
Definition: mdl_distiller_plugin_api.h:30
An instantiated material.
Definition: mdl_generated_dag.h:493
An interface for reporting rule matcher events.
Definition: mdl_distiller_rules.h:139
Abstract interface for MDL distiller plugins.
Definition: mdl_distiller_plugin.h:30
virtual const char * get_required_module_code(mi::Size target_index, mi::Size module_index) const =0
Returns the MDL source code of the required module at the given index.
virtual const mi::mdl::IGenerated_code_dag::IMaterial_instance * distill(mi::mdl::IDistiller_plugin_api &api, mi::mdl::IRule_matcher_event *event_handler, const mi::mdl::IGenerated_code_dag::IMaterial_instance *material_instance, mi::Size target_index, Distiller_options *options, mi::Sint32 *p_error) const =0
Main function to distill an MDL material.
virtual const char * get_name() const =0
Returns the name of the plugin.
virtual const char * get_required_module_name(mi::Size target_index, mi::Size module_index) const =0
Returns the fully qualified name of the required module at the given index.
virtual mi::Size get_required_module_count(mi::Size target_index) const =0
Returns the number of modules that are required by result materials of this Distiller plugin.
virtual bool exit()=0
De-initializes the plugin.
virtual mi::Size get_api_version() const =0
Return the distiller plugin API version.
virtual bool init(mi::base::ILogger *logger)=0
Initializes the plugin.
virtual mi::Size get_target_count() const =0
Returns the number of available distilling targets.
virtual const char * get_target_name(mi::Size index) const =0
Returns the name of the distilling target at index position.
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Logger interface class that supports message logging.
Mixin class template for deriving new interface declarations.
Options for distiller rule applications.
MDL distiller plugin API.
Interfaces for the MDL DAG Intermediate Representation.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Base class for all plugins.
Basic types.