| 275 | } |
| 276 | |
| 277 | void update_instance_transforms() |
| 278 | { |
| 279 | if (g_use_instance_array) |
| 280 | { |
| 281 | rtcUpdateGeometryBuffer(instance_array, RTC_BUFFER_TYPE_TRANSFORM, 0); |
| 282 | rtcCommitGeometry(instance_array); |
| 283 | } |
| 284 | else |
| 285 | { |
| 286 | for (unsigned int i = 0; i < num_trees; ++i) { |
| 287 | rtcSetGeometryTransform(instances[i],0,RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,(float*)&data.tree_transforms_host[i]); |
| 288 | rtcCommitGeometry(instances[i]); |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | void rebuild_instances(size_t old_num_trees) |
| 294 | { |
no test coverage detected