MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imdl_compiler.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMDL_COMPILER_H
8 #define MI_NEURAYLIB_IMDL_COMPILER_H
9 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
16 namespace base { class ILogger; }
17 
18 class IString;
19 
20 namespace neuraylib {
21 
22 class IBsdf_isotropic_data;
23 class ICanvas;
24 class ILightprofile;
25 class IMdl_backend;
26 class IMdl_execution_context;
27 class ITransaction;
28 
33 class IMdl_compiler : public
35  mi::base::Interface_declare<0x8fff0a2d,0x7df7,0x4552,0x92,0xf7,0x36,0x1d,0x31,0xc6,0x30,0x08>
36 {
37 public:
38 
39  virtual void MI_NEURAYLIB_DEPRECATED_METHOD_11_1(set_logger)( base::ILogger* logger) = 0;
40 
41  virtual base::ILogger* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_logger)() = 0;
42 
43  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(add_module_path)( const char* path) = 0;
44 
45  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(remove_module_path)( const char* path) = 0;
46 
47 
48  virtual void MI_NEURAYLIB_DEPRECATED_METHOD_11_1(clear_module_paths)() = 0;
49 
50  virtual Size MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_module_paths_length)() const = 0;
51 
52  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_module_path)( Size index) const = 0;
53 
54 
55  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(add_resource_path)( const char* path) = 0;
56 
57  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(remove_resource_path)( const char* path) = 0;
58 
59  virtual void MI_NEURAYLIB_DEPRECATED_METHOD_11_1(clear_resource_paths)() = 0;
60 
61  virtual Size MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_resource_paths_length)() const = 0;
62 
63  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_resource_path)( Size index) const = 0;
64 
65  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(load_plugin_library)( const char* path) = 0;
66 
67  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(load_module)(
68  ITransaction* transaction, const char* module_name, IMdl_execution_context* context = 0) = 0;
69 
70  virtual const char* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_module_db_name)(
71  ITransaction* transaction, const char* module_name, IMdl_execution_context* context = 0) = 0;
72 
73  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(load_module_from_string)(
74  ITransaction* transaction,
75  const char* module_name,
76  const char* module_source,
77  IMdl_execution_context* context = 0) = 0;
78 
94  virtual Sint32 add_builtin_module( const char* module_name, const char* module_source) = 0;
95 
96  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(export_module)(
97  ITransaction* transaction,
98  const char* module_name,
99  const char* filename,
100  IMdl_execution_context* context = 0) = 0;
101 
102  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(export_module_to_string)(
103  ITransaction* transaction,
104  const char* module_name,
105  IString* exported_module,
106  IMdl_execution_context* context = 0) = 0;
107 
108  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(export_canvas)(
109  const char* filename, const ICanvas* canvas, Uint32 quality = 100) const = 0;
110 
111  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(export_lightprofile)(
112  const char* filename, const ILightprofile* lightprofile) const = 0;
113 
114  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_11_1(export_bsdf_data)(
115  const char* filename,
116  const IBsdf_isotropic_data* reflection,
117  const IBsdf_isotropic_data* transmission) const = 0;
118 
119  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(uvtile_marker_to_string)(
120  const char* marker,
121  Sint32 u,
122  Sint32 v) const = 0;
123 
124  virtual const IString* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(uvtile_string_to_marker)(
125  const char* str, const char* marker) const = 0;
126 
127  enum Mdl_backend_kind {
128  MB_CUDA_PTX,
129  MB_LLVM_IR,
130  MB_GLSL,
131  MB_NATIVE,
132  MB_HLSL,
133  MB_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
134  };
135 
136  virtual IMdl_backend* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_backend)( Mdl_backend_kind kind) = 0;
137 
138  virtual const Float32* MI_NEURAYLIB_DEPRECATED_METHOD_11_1(get_df_data_texture)(
139  Df_data_kind kind,
140  Size &rx,
141  Size &ry,
142  Size &rz) const = 0;
143 };
144 
145 mi_static_assert( sizeof( IMdl_compiler::Mdl_backend_kind)== sizeof( Uint32));
146  // end group mi_neuray_mdl_compiler
148 
149 } // namespace neuraylib
150 
151 } // namespace mi
152 
153 #endif // MI_NEURAYLIB_IMDL_COMPILER_H