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

Function device_init

tutorials/lazy_geometry/lazy_geometry_device.cpp:262–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261/* called by the C++ code for initialization */
262extern "C" void device_init (char* cfg)
263{
264 /* create scene */
265 g_scene = rtcNewScene(g_device);
266
267 /* instantiate geometry */
268 createGroundPlane(g_scene);
269 for (int i=0; i<numSpheres; i++) {
270 float a = 2.0f*float(M_PI)*(float)i/(float)numSpheres;
271 g_objects[i] = createLazyObject(g_scene,i,10.0f*Vec3fa(cosf(a),0,sinf(a)),1);
272 }
273 rtcCommitScene (g_scene);
274}
275
276/* task that renders a single screen tile */
277Vec3fa renderPixelStandard(float x, float y, const ISPCCamera& camera, RayStats& stats)

Callers

nothing calls this directly

Calls 5

rtcNewSceneFunction · 0.85
createLazyObjectFunction · 0.85
rtcCommitSceneFunction · 0.85
createGroundPlaneFunction · 0.70
Vec3faClass · 0.50

Tested by

no test coverage detected