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

Function device_init

tutorials/forest/forest_device.cpp:125–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124/* called by the C++ code for initialization */
125extern "C" void device_init (char* cfg)
126{
127 rtcSetDeviceMemoryMonitorFunction(g_device, monitorMemoryFunction, nullptr);
128
129 TutorialData_Constructor(&data);
130
131 for (unsigned int i = 0; i < 6; ++i) {
132 scene_trees[i] = rtcNewScene(g_device);
133 addTree(scene_trees[i], i);
134 rtcCommitScene(scene_trees[i]);
135 }
136
137 /* add ground plane */
138 scene_terrain = rtcNewScene(g_device);
139 addTerrain(scene_terrain);
140 rtcCommitScene(scene_terrain);
141}
142
143void update_trees(float time)
144{

Callers

nothing calls this directly

Calls 6

rtcNewSceneFunction · 0.85
addTreeFunction · 0.85
rtcCommitSceneFunction · 0.85
addTerrainFunction · 0.85
TutorialData_ConstructorFunction · 0.70

Tested by

no test coverage detected