| 314 | |
| 315 | /* called by the C++ code to render */ |
| 316 | extern "C" void device_render (int* pixels, |
| 317 | const unsigned int width, |
| 318 | const unsigned int height, |
| 319 | const float time, |
| 320 | const ISPCCamera& camera) |
| 321 | { |
| 322 | /* animate sphere */ |
| 323 | for (int i=0; i<data.numSpheres; i++) |
| 324 | animateSphere(i,time+i); |
| 325 | |
| 326 | /* commit changes to scene */ |
| 327 | #if defined(EMBREE_SYCL_TUTORIAL) |
| 328 | rtcCommitSceneWithQueue (data.g_scene, *global_gpu_queue); |
| 329 | #else |
| 330 | rtcCommitScene (data.g_scene); |
| 331 | #endif |
| 332 | /* The RTCTraversable object may be invaludated and has to be acquired again after the dynamic scene has been commited */ |
| 333 | data.g_traversable = rtcGetSceneTraversable(data.g_scene); |
| 334 | } |
| 335 | |
| 336 | /* called by the C++ code for cleanup */ |
| 337 | extern "C" void device_cleanup () |
nothing calls this directly
no test coverage detected