ospray / anari-ospray

Translation layer from ANARI to OSPRay, ANARILibrary and ANARIDevice "ospray".
Apache License 2.0
17 stars 5 forks source link

Use a default status func if none was set by the user #3

Closed szellmann closed 2 years ago

szellmann commented 2 years ago

I found that apps using anari-ospray crash when the environment variable OSPRAY_LOG_LEVEL was set. That's because anari-ospray installs a custom (user-settable) status function which is however NULL when the user did not set it as a device parameter. The proposed commit will default-initialize that status function to simply print the status messages to stderr, or to the device's default status function set by the user via anariLoadLibrary (if the latter is not NULL).

johguenther commented 2 years ago

manually merged, thanks