MDL SDK API nvidia_logo_transpbg.gif Up
imdl_backend_api.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_BACKEND_API_H
8#define MI_NEURAYLIB_IMDL_BACKEND_API_H
9
11
12namespace mi {
13
14namespace neuraylib {
15
16class IMdl_backend;
17
38 DFK_NONE,
39 DFK_INVALID,
40 DFK_SIMPLE_GLOSSY_MULTISCATTER,
41 DFK_BACKSCATTERING_GLOSSY_MULTISCATTER,
42 DFK_BECKMANN_SMITH_MULTISCATTER,
43 DFK_BECKMANN_VC_MULTISCATTER,
44 DFK_GGX_SMITH_MULTISCATTER,
45 DFK_GGX_VC_MULTISCATTER,
46 DFK_WARD_GEISLER_MORODER_MULTISCATTER,
47 DFK_SHEEN_MULTISCATTER,
48 DFK_FORCE_32_BIT = 0xffffffffU
49};
50
51mi_static_assert(sizeof(Df_data_kind) == sizeof(Uint32));
52
54class IMdl_backend_api : public
55 mi::base::Interface_declare<0x425559dd,0xbf91,0x459a,0xaa,0xaf,0xc3,0x14,0x8a,0x5a,0x2f,0x99>
56{
57public:
58
66 MB_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
67 };
68
75
77
87 Df_data_kind kind,
88 Size &rx,
89 Size &ry,
90 Size &rz) const = 0;
91};
92 // end group mi_neuray_mdl_misc
94
95} // namespace neuraylib
96
97} // namespace mi
98
99#endif // MI_NEURAYLIB_IMDL_BACKEND_API_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This interface can be used to obtain the MDL backends.
Definition: imdl_backend_api.h:56
Mdl_backend_kind
Currently available MDL backends.
Definition: imdl_backend_api.h:60
@ MB_NATIVE
Generate native code.
Definition: imdl_backend_api.h:64
@ MB_CUDA_PTX
Generate CUDA PTX code.
Definition: imdl_backend_api.h:61
@ MB_LLVM_IR
Generate LLVM IR (LLVM 12.0 compatible).
Definition: imdl_backend_api.h:62
@ MB_GLSL
Generate GLSL code.
Definition: imdl_backend_api.h:63
@ MB_HLSL
Generate HLSL code.
Definition: imdl_backend_api.h:65
virtual IMdl_backend * get_backend(Mdl_backend_kind kind)=0
Returns an MDL backend generator.
virtual const Float32 * get_df_data_texture(Df_data_kind kind, Size &rx, Size &ry, Size &rz) const =0
Returns the distribution function data of the texture identified by kind.
MDL backends allow to transform compiled material instances or function calls into target code.
Definition: imdl_backend.h:40
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:58
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
float Float32
32-bit float.
Definition: types.h:51
Df_data_kind
Possible kinds of distribution function data.
Definition: imdl_backend_api.h:37
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5