* Embree has a notion of devices, which are entities that can run * raytracing kernels. * We initialize our device here, and then register the error handler so that * we don't miss any errors. * * rtcNewDevice() takes a configuration string as an argument. See the API docs * for more information. * * Note that RTCDevice is reference-counted. */
| 104 | * Note that RTCDevice is reference-counted. |
| 105 | */ |
| 106 | RTCDevice initializeDevice(sycl::context& sycl_context, sycl::device& sycl_device) |
| 107 | { |
| 108 | RTCDevice device = rtcNewSYCLDevice(sycl_context, ""); |
| 109 | rtcSetDeviceSYCLDevice(device,sycl_device); |
| 110 | |
| 111 | if (!device) { |
| 112 | printf("error %s: cannot create device. (reason: %s)\n", rtcGetErrorString(rtcGetDeviceError(NULL)), rtcGetDeviceLastErrorMessage(NULL)); |
| 113 | exit(1); |
| 114 | } |
| 115 | |
| 116 | rtcSetDeviceErrorFunction(device, errorFunction, NULL); |
| 117 | return device; |
| 118 | } |
| 119 | |
| 120 | /* |
| 121 | * Create a scene, which is a collection of geometry objects. Scenes are |
no test coverage detected