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

Function device_init

tutorials/point_geometry/point_geometry_device.cpp:86–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85/* called by the C++ code for initialization */
86extern "C" void device_init (char* cfg)
87{
88 /* create scene */
89 TutorialData_Constructor(&data);
90 g_scene = data.g_scene = rtcNewScene(g_device);
91
92 /* add ground plane */
93 addGroundPlane(g_scene);
94
95 /* add curve */
96 addPoints(g_scene, RTC_GEOMETRY_TYPE_SPHERE_POINT, Vec3fa( 0.0f, 0.0f, 0.0f));
97 addPoints(g_scene, RTC_GEOMETRY_TYPE_DISC_POINT, Vec3fa( 5.0f, 0.0f, 0.0f));
98 addPoints(g_scene, RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT, Vec3fa(-5.0f, 0.0f, 0.0f));
99
100 /* commit changes to scene */
101 rtcCommitScene (g_scene);
102 data.g_traversable = rtcGetSceneTraversable(data.g_scene);
103}
104
105/* task that renders a single screen tile */
106void renderPixelStandard(const TutorialData& data,

Callers

nothing calls this directly

Calls 6

rtcNewSceneFunction · 0.85
addPointsFunction · 0.85
rtcCommitSceneFunction · 0.85
TutorialData_ConstructorFunction · 0.70
addGroundPlaneFunction · 0.70
Vec3faClass · 0.50

Tested by

no test coverage detected