Iray SDK API nvidia_logo_transpbg.gif Up
irendering_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IRENDERING_CONFIGURATION_H
8#define MI_NEURAYLIB_IRENDERING_CONFIGURATION_H
9
11#include <mi/base/enum_util.h>
13#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
14
15namespace mi {
16
17class IArray;
18class IString;
19class IStructure;
20
21namespace neuraylib {
22
23class IGpu_description;
24
31class ILpe_check_result : public
32 mi::base::Interface_declare<0xec3bc890,0x4ea8,0x4465,0x9e,0x83,0xd8,0x41,0xa8,0xb4,0x77,0x94>
33{
34public:
36 virtual Size get_messages_length() const = 0;
37
40 virtual Size get_index( Size i) const = 0;
41
43 virtual bool get_color_expression_flag( Size i) const = 0;
44
47 virtual Size get_position( Size i) const = 0;
48
51 virtual const char* get_message( Size i) const = 0;
52};
53
70 mi::base::Interface_declare<0xec3bc890,0x4ea8,0x4465,0x9e,0x83,0xd8,0x41,0xa8,0xb4,0x77,0x95,
71 neuraylib::ILpe_check_result>
72{
73public:
87
93
95 virtual Size get_overlap_count() const = 0;
96
98 virtual bool get_color_overlap_flag( Size i) const = 0;
99
101 virtual bool get_overlap_indices( Size i, Size& o1, Size& o2) const = 0;
102
104 virtual bool get_overlap_expressions( Size i, const char*& lpe1, const char*& lpe2) const = 0;
105};
106
109 mi::base::Interface_declare<0x8e148c6e,0x3515,0x4368,0xba,0xb7,0x97,0xfd,0x26,0x35,0xbb,0x91>
110{
111public:
113
114
125 virtual Sint32 add_mdl_path( const char* path) = 0;
126
137 virtual Sint32 remove_mdl_path( const char* path) = 0;
138
143 virtual void clear_mdl_paths() = 0;
144
151 virtual Size get_mdl_paths_length() const = 0;
152
160 virtual const IString* get_mdl_path( Size index) const = 0;
161
163
165
177 virtual Sint32 add_resource_path( const char* path) = 0;
178
190 virtual Sint32 remove_resource_path( const char* path) = 0;
191
197 virtual void clear_resource_paths() = 0;
198
206 virtual Size get_resource_paths_length() const = 0;
207
216 virtual const IString* get_resource_path( Size index) const = 0;
217
219
221
232 virtual Sint32 add_include_path( const char* path) = 0;
233
244 virtual Sint32 remove_include_path( const char* path) = 0;
245
250 virtual void clear_include_paths() = 0;
251
258 virtual Size get_include_paths_length() const = 0;
259
267 virtual const IString* get_include_path( Size index) const = 0;
268
285 virtual Sint32 add_custom_attribute_filter(const char* name_pattern) = 0;
286
298 virtual Sint32 remove_custom_attribute_filter(const char* name_pattern) = 0;
299
306
315
324 virtual const char* get_custom_attribute_filter(Size index) const = 0;
325
327
329
334 virtual Uint32 get_renderers_length() const = 0;
335
341 virtual const char* get_renderer( Uint32 index) const = 0;
342
365 virtual Sint32 set_renderer_option( const char* name, const char* value) = 0;
366
374 virtual const IString* get_renderer_option( const char* name) const = 0;
375
377
384 static const Uint32 CPU = 0xffffffff;
385
389 static const Uint32 ALL_GPUS = 0xfffffffe;
390
394 static const Uint32 ALL_HOSTS = 0xfffffffd;
395
399 static const Uint32 LOCAL_HOST = 0;
400
402
403
413 virtual Sint32 set_gpu_enabled( bool value) = 0;
414
418 virtual bool get_gpu_enabled() const = 0;
419
429 virtual Sint32 set_cpu_fallback_enabled( bool value) = 0;
430
434 virtual bool get_cpu_fallback_enabled() const = 0;
435
444 virtual Sint32 set_driver_version_check_enabled( bool value) = 0;
445
449 virtual bool get_driver_version_check_enabled() const = 0;
450
461 virtual Uint32 get_highest_gpu_id( Uint32 host_id = 0) = 0;
462
477 virtual const IGpu_description* get_gpu_description( Uint32 gpu_id, Uint32 host_id = 0) = 0;
478
488
508 Uint32 resource_id, Uint32 host_id, const char* render_mode, bool enable) = 0;
509
534 Uint32 resource_id, Uint32 host_id, const char* render_mode, bool& enable) = 0;
535
537
550 ALPHA_NONE = 0x03u,
551
554
558 ALPHA_MATTE_SHADOW = 0x10u
559 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(ALPHA_MODE_FORCE_32_BIT, 0xffffffffU)
560 };
561
563
564
583 const IArray* expressions) const = 0;
584
597 const char* canvas_name) const = 0;
598
612 virtual const IString* make_alpha_expression( Alpha_mode alpha_mode) const = 0;
613
639 const IArray* labels, bool exclude, Alpha_mode alpha_mode) const = 0;
640
661 const IArray* labels, bool exclude) const = 0;
662
681 const IArray* expressions) const = 0;
682
684
692 virtual ICanvas_parameters* map_canvas_name(const char* name) const = 0;
693
705
710 virtual const char* map_canvas_type(Canvas_type) const = 0;
711};
712
713MI_MAKE_ENUM_BITOPS(IRendering_configuration::Alpha_mode);
714 // end group mi_neuray_configuration
716
717} // namespace neuraylib
718
719} // namespace mi
720
721#endif // MI_NEURAYLIB_IRENDERING_CONFIGURATION_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
A simple string class.
Definition: istring.h:22
This interface represents structures, i.e., a key-value based data structure.
Definition: istructure.h:44
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface for render target canvas parameters.
Definition: irender_target.h:107
This interface describes a GPU.
Definition: igpu_description.h:27
This interface represents the return value of mi::neuraylib::IRendering_configuration::analyze_light_...
Definition: irendering_configuration.h:72
virtual bool get_overlap_expressions(Size i, const char *&lpe1, const char *&lpe2) const =0
Retrieves the LPEs of a given overlap pair.
virtual Size get_overlap_count() const =0
Indicates the number of entries in the list of LPE overlaps.
virtual bool get_color_overlap_flag(Size i) const =0
Indicates whether a given overlap pair refers to color or alpha LPEs.
virtual Size get_alpha_classification_count() const =0
Reflects the number of classifications that are made possible by the alpha LPEs that were analyzed.
virtual Size get_color_classification_count() const =0
Reflects the number of classifications that are made possible by the color LPEs that were analyzed.
virtual bool get_overlap_indices(Size i, Size &o1, Size &o2) const =0
Retrieves the input indices of a given overlap pair.
This interface represents the return value of mi::neuraylib::IRendering_configuration::check_light_pa...
Definition: irendering_configuration.h:33
virtual Size get_position(Size i) const =0
Returns the position of the offending character/token in the light path expression identified by get_...
virtual const char * get_message(Size i) const =0
Returns an error message describing why the light path expression identified by get_index() is invali...
virtual Size get_index(Size i) const =0
Returns the index of the light path expression in the input array that this error message applies to.
virtual Size get_messages_length() const =0
Returns the number of error messages represented by this interface.
virtual bool get_color_expression_flag(Size i) const =0
Indicates whether the error message applies to the color or alpha expression.
This interface is used to query and change the rendering configuration.
Definition: irendering_configuration.h:110
virtual Sint32 add_resource_path(const char *path)=0
Adds a path to the list of paths to search for resources, i.e., textures, light profiles,...
virtual void clear_resource_paths()=0
Clears the list of paths to search for resources, i.e., textures, light profiles, and BSDF measuremen...
virtual Uint32 get_renderers_length() const =0
Returns the number of render modes.
virtual Size get_custom_attribute_filter_length() const =0
Returns the number of configured custom attribute filters.
virtual const IStructure * extract_light_path_expressions_from_name(const char *canvas_name) const =0
Extract color and alpha light path expressions (LPEs) from a canvas name.
virtual const IString * get_resource_path(Size index) const =0
Returns the index -th path to search for resources, i.e., textures, light profiles,...
virtual Sint32 set_gpu_enabled(bool value)=0
Enables or disables GPU detection.
virtual Sint32 set_driver_version_check_enabled(bool value)=0
Enables or disables the check for the GPU driver version.
virtual bool get_driver_version_check_enabled() const =0
Returns whether the check for the GPU driver version is enabled.
virtual IString * map_canvas_parameters(const ICanvas_parameters *) const =0
Creates a canvas name from the provided parameters.
virtual Size get_resource_paths_length() const =0
Returns the number of paths to search for resources, i.e., textures, light profiles,...
virtual const IString * make_alpha_expression(Alpha_mode alpha_mode) const =0
Generates a light path expression that controls the alpha channel behavior.
virtual Sint32 remove_include_path(const char *path)=0
Removes a path from the list of paths to search for includes.
static const Uint32 CPU
Symbolic constant to refer to the CPU on a particular host.
Definition: irendering_configuration.h:384
virtual Sint32 remove_resource_path(const char *path)=0
Removes a path from the list of paths to search for resources, i.e., textures, light profiles,...
virtual const IString * get_mdl_path(Size index) const =0
Returns the index -th path to search for MDL modules.
virtual const char * get_renderer(Uint32 index) const =0
Returns the name of a given render mode.
virtual const ILpe_check_result * check_light_path_expressions(const IArray *expressions) const =0
Checks whether a sequence of light path expressions (LPEs) is valid.
virtual Sint32 set_resource_enabled(Uint32 resource_id, Uint32 host_id, const char *render_mode, bool enable)=0
Enables or disables a specific resource (GPU or CPU) for a render mode.
virtual const char * get_custom_attribute_filter(Size index) const =0
Returns the index -th custom attribute filter.
virtual Sint32 add_include_path(const char *path)=0
Adds a path to the list of paths to search for includes.
virtual const char * map_canvas_type(Canvas_type) const =0
Creates a canvas name for the provided type.
virtual Sint32 add_custom_attribute_filter(const char *name_pattern)=0
Adds a filter to the list of custom attribute filters.
virtual const IString * get_include_path(Size index) const =0
Returns the index -th path to search for includes.
virtual bool get_cpu_fallback_enabled() const =0
Returns if CPU fallback is enabled.
virtual Size get_include_paths_length() const =0
Returns the number of paths to search for includes.
Alpha_mode
Controls the behavior of the alpha channel.
Definition: irendering_configuration.h:542
@ ALPHA_PRIMARY
Alpha value is based on primary visibility.
Definition: irendering_configuration.h:544
@ ALPHA_MATTE_SHADOW
In combination with the primary modes: shadows on matte objects affect the alpha channel.
Definition: irendering_configuration.h:558
@ ALPHA_NONE
Alpha is transparent everywhere. Primarily useful together with ALPHA_MATTE_SHADOW.
Definition: irendering_configuration.h:550
@ ALPHA_TRANSMIT
Alpha is transparent for paths that transmit the environment.
Definition: irendering_configuration.h:546
@ ALPHA_TRANSMIT_SPECULAR
Alpha is transparent for paths that transmit the environment specularly.
Definition: irendering_configuration.h:548
@ ALPHA_MODE_MASK
Mask for primary modes.
Definition: irendering_configuration.h:553
virtual bool get_gpu_enabled() const =0
Returns if GPU detection is enabled.
virtual Size get_mdl_paths_length() const =0
Returns the number of paths to search for MDL modules.
virtual const IString * make_alpha_mask_expression(const IArray *labels, bool exclude, Alpha_mode alpha_mode) const =0
Generates a light path expression that can be used to render alpha masks.
virtual Sint32 remove_mdl_path(const char *path)=0
Removes a path from the list of paths to search for MDL modules.
virtual void clear_custom_attribute_filters()=0
Clears the list of custom attribute filters.
virtual Sint32 get_resource_enabled(Uint32 resource_id, Uint32 host_id, const char *render_mode, bool &enable)=0
Indicates whether a specific resource (GPU or CPU) is enabled or disabled for a render mode.
static const Uint32 LOCAL_HOST
Symbolic constant to refer to the local host in the cluster.
Definition: irendering_configuration.h:399
virtual Sint32 remove_custom_attribute_filter(const char *name_pattern)=0
Removes a filter from the list of custom attribute filters.
virtual Sint32 set_cpu_fallback_enabled(bool value)=0
Enables or disables CPU fallback.
virtual const ILpe_analysis_result * analyze_light_path_expressions(const IArray *expressions) const =0
Analyzes a sequence of light path expressions (LPEs).
virtual const IString * make_color_mask_expression(const IArray *labels, bool exclude) const =0
Generates a light path expression that can be used to render color masks.
virtual const IGpu_description * get_gpu_description(Uint32 gpu_id, Uint32 host_id=0)=0
Returns the description of a GPU with a given ID.
virtual Sint32 set_renderer_option(const char *name, const char *value)=0
Sets the value of a general rendering option.
virtual ICanvas_parameters * map_canvas_name(const char *name) const =0
Creates canvas parameters from a canvas names.
virtual void clear_include_paths()=0
Clears the list of paths to search for includes.
virtual const IString * get_renderer_option(const char *name) const =0
Returns the value of a general rendering option.
virtual Sint32 add_mdl_path(const char *path)=0
Adds a path to the list of paths to search for MDL modules.
static const Uint32 ALL_HOSTS
Symbolic constant to refer to all hosts in the cluster.
Definition: irendering_configuration.h:394
virtual Uint32 get_highest_gpu_id(Uint32 host_id=0)=0
Returns the highest GPU ID.
static const Uint32 ALL_GPUS
Symbolic constant to refer to all GPUs on a particular host.
Definition: irendering_configuration.h:389
virtual void clear_mdl_paths()=0
Clears the list of paths to search for MDL modules.
int Sint32
32-bit signed integer.
Definition: types.h:46
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Canvas_type
The type of a canvas in an mi::neuraylib::IRender_target_base.
Definition: irender_target.h:32
Mixin class template for deriving new interface declarations.
Abstract interface for render targets.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Major and minor version number and an optional qualifier.