| 329 | |
| 330 | /* called by the C++ code for initialization */ |
| 331 | extern "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 */ |
| 352 | Vec3fa renderPixel(const TutorialData& data, float x, float y, const ISPCCamera& camera, RayStats& stats) |
nothing calls this directly
no test coverage detected