| 176 | OSPRAY_CATCH_END(nullptr) |
| 177 | |
| 178 | extern "C" void ospSetCurrentDevice(OSPDevice _device) OSPRAY_CATCH_BEGIN |
| 179 | { |
| 180 | auto *device = (Device *)_device; |
| 181 | |
| 182 | if ((device) && (!device->isCommitted())) { |
| 183 | throw std::runtime_error("You must commit the device before using it!"); |
| 184 | } |
| 185 | |
| 186 | Device::current = device; |
| 187 | } |
| 188 | OSPRAY_CATCH_END() |
| 189 | |
| 190 | extern "C" OSPDevice ospGetCurrentDevice() OSPRAY_CATCH_BEGIN |
no test coverage detected