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

Function device_init

tutorials/interpolation/interpolation_device.cpp:331–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329
330/* called by the C++ code for initialization */
331extern "C" void device_init (char* cfg)
332{
333 /* create scene */
334 TutorialData_Constructor(&data);
335 g_scene = data.scene = rtcNewScene(g_device);
336
337 /* add ground plane */
338 addGroundPlane(g_scene);
339
340 /* add cubes */
341 addCurve(g_scene,Vec3fa(4.0f,-1.0f,-3.5f));
342 //quadCubeID = addQuadSubdivCube(g_scene,Vec3fa(4.0f,0.0f,0.0f));
343 //triCubeID = addTriangleSubdivCube(g_scene,Vec3fa(4.0f,0.0f,3.5f));
344 addTriangleCube(g_scene,Vec3fa(0.0f,0.0f,-3.0f));
345 addQuadCube(g_scene,Vec3fa(0.0f,0.0f,3.0f));
346
347 /* commit changes to scene */
348 rtcCommitScene (g_scene);
349}
350
351/* task that renders a single screen tile */
352Vec3fa renderPixel(const TutorialData& data, float x, float y, const ISPCCamera& camera, RayStats& stats)

Callers

nothing calls this directly

Calls 8

rtcNewSceneFunction · 0.85
rtcCommitSceneFunction · 0.85
TutorialData_ConstructorFunction · 0.70
addGroundPlaneFunction · 0.70
addCurveFunction · 0.70
addTriangleCubeFunction · 0.70
addQuadCubeFunction · 0.70
Vec3faClass · 0.50

Tested by

no test coverage detected