| 10 | #endif |
| 11 | |
| 12 | OIDN_NAMESPACE_BEGIN |
| 13 | |
| 14 | ModuleLoader::ModuleLoader() |
| 15 | { |
| 16 | // Get the path of the current module |
| 17 | const Path path = getModulePath(); |
| 18 | |
| 19 | // Remove the filename from the path |
| 20 | const size_t lastPathSep = path.find_last_of(pathSeps); |
| 21 | if (lastPathSep == Path::npos) |
| 22 | throw std::runtime_error("could not get absolute path of module directory"); |
| 23 | modulePathPrefix = path.substr(0, lastPathSep + 1); |
| 24 | } |
| 25 | |
| 26 | bool ModuleLoader::load(const std::string& name) |
| 27 | { |