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

Function device_init

tutorials/voronoi/voronoi_device.cpp:153–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152/* called by the C++ code for initialization */
153extern "C" void device_init (char* cfg)
154{
155 /* create scene */
156 TutorialData_Constructor(&data);
157
158 data.query_point = g_query_point;
159 data.num_points = g_num_points;
160 data.num_knn = g_num_knn;
161 data.show_voronoi = g_show_voronoi;
162 data.point_repulsion = g_point_repulsion;
163 data.tmax = g_tmax;
164
165 g_scene = data.scene = rtcNewScene(g_device);
166 createPoints(data);
167 rtcCommitScene(data.scene);
168
169 data.colors = (Vec3fa*) alignedMalloc(NUM_COLORS*sizeof(Point), 16);
170 for (int r = 0; r < 3; ++r) for (int g = 0; g < 3; ++g) for (int b = 0; b < 3; ++b)
171 data.colors[r * 9 + g * 3 + b] = Vec3fa(0.2f + 0.3f * r, 0.2f + 0.3f * g, 0.2f + 0.3f * b);
172}
173
174/* renders a single screen tile */
175void renderTileStandard(int taskIndex,

Callers

nothing calls this directly

Calls 6

rtcNewSceneFunction · 0.85
rtcCommitSceneFunction · 0.85
alignedMallocFunction · 0.85
TutorialData_ConstructorFunction · 0.70
createPointsFunction · 0.70
Vec3faClass · 0.50

Tested by

no test coverage detected