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

Function device_init

tutorials/ray_mask/ray_mask_device.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101/* called by the C++ code for initialization */
102extern "C" void device_init (char* cfg)
103{
104 /* create scene */
105 TutorialData_Constructor(&data);
106 g_scene = data.g_scene = rtcNewScene(g_device);
107
108 /* create face and vertex color arrays */
109 data.face_colors = (Vec3fa*) alignedUSMMalloc((12)*sizeof(Vec3fa),16);
110 data.vertex_colors = (Vec3fa*) alignedUSMMalloc((8)*sizeof(Vec3fa),16);
111
112 /* add cube */
113 addCube(data.g_scene,Vec3fa(-3.f, 0.f, 0.f), MASK_PI_SV);
114 addCube(data.g_scene,Vec3fa( 0.f, 0.f, 0.f), MASK_PV_SV);
115 addCube(data.g_scene,Vec3fa( 3.f, 0.f, 0.f), MASK_PV_SI);
116
117 /* add ground plane */
118 addGroundPlane(data.g_scene);
119
120 /* commit changes to scene */
121 rtcCommitScene (data.g_scene);
122 data.g_traversable = rtcGetSceneTraversable(data.g_scene);
123}
124
125/* task that renders a single screen tile */
126void renderPixelStandard(const TutorialData& data,

Callers

nothing calls this directly

Calls 7

rtcNewSceneFunction · 0.85
alignedUSMMallocFunction · 0.85
rtcCommitSceneFunction · 0.85
TutorialData_ConstructorFunction · 0.70
addCubeFunction · 0.70
addGroundPlaneFunction · 0.70
Vec3faClass · 0.50

Tested by

no test coverage detected