@@ -89,6 +89,19 @@ def __init__(self,
8989 self ._is_started = False
9090 self ._is_closed = False
9191
92+ rt_log = 0
93+ if isinstance (log_level , int ):
94+ if log_level == logging .ERROR : rt_log = 1
95+ elif log_level == logging .WARNING : rt_log = 2
96+ elif log_level == logging .INFO : rt_log = 3
97+ elif log_level == logging .DEBUG : rt_log = 4
98+ if isinstance (log_level , str ):
99+ if log_level == 'ERROR' : rt_log = 1
100+ elif log_level == 'WARNING' : rt_log = 2
101+ elif log_level == 'WARN' : rt_log = 2
102+ elif log_level == 'INFO' : rt_log = 3
103+ elif log_level == 'DEBUG' : rt_log = 4
104+
92105 # load SharpOptiX library, configure paths ####################
93106 self ._logger .info ("Configure RnD.SharpOptiX library..." )
94107 self ._optix = load_optix ()
@@ -123,7 +136,7 @@ def __init__(self,
123136
124137 if src is None : # create empty scene
125138 self ._logger .info (" - ray-tracer initialization" )
126- self ._is_scene_created = self ._optix .create_empty_scene (self ._width , self ._height , self ._img_rgba .ctypes .data , self ._img_rgba .size )
139+ self ._is_scene_created = self ._optix .create_empty_scene (self ._width , self ._height , self ._img_rgba .ctypes .data , self ._img_rgba .size , rt_log )
127140 if self ._is_scene_created : self ._logger .info ("Empty scene ready." )
128141
129142 elif isinstance (src , str ): # create scene from file
0 commit comments