| 100 | |
| 101 | /* called by the C++ code for initialization */ |
| 102 | extern "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 */ |
| 126 | void renderPixelStandard(const TutorialData& data, |
nothing calls this directly
no test coverage detected