MCPcopy Create free account
hub / github.com/RenderKit/embree / device_render

Function device_render

tutorials/dynamic_scene/dynamic_scene_device.cpp:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314
315/* called by the C++ code to render */
316extern "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 */
337extern "C" void device_cleanup ()

Callers

nothing calls this directly

Calls 2

rtcCommitSceneFunction · 0.85
animateSphereFunction · 0.70

Tested by

no test coverage detected