| 442 | |
| 443 | |
| 444 | void TriDevice::Update( Be::Time realTime, Be::Time simTime ) |
| 445 | { |
| 446 | #if BLUE_WITH_PYTHON |
| 447 | AutoTasklet _at( PyOS->GetTaskletTimer(), "TriDevice::Update" ); |
| 448 | #endif |
| 449 | |
| 450 | TriSrand( simTime ); |
| 451 | |
| 452 | // Callbacks to Python when curve sets finish may add curve sets to the device curve sets |
| 453 | // list. This will mess up the iterator unless we iterate over a copy. |
| 454 | CTriCurveSetVector curveSets; |
| 455 | for( auto it = m_curveSets.cbegin(); it != m_curveSets.cend(); ++it ) |
| 456 | { |
| 457 | curveSets.Insert( -1, ( *it )->GetRawRoot() ); |
| 458 | } |
| 459 | for( auto it = curveSets.cbegin(); it != curveSets.cend(); ++it ) |
| 460 | { |
| 461 | ( *it )->Update( realTime, simTime ); |
| 462 | } |
| 463 | curveSets.Remove( -1 ); |
| 464 | |
| 465 | // Remember, m_curveSets is a BlueList, must use Remove to get ref-count right. |
| 466 | for( ssize_t i = 0; i < m_curveSets.GetSize(); ) |
| 467 | { |
| 468 | TriCurveSet* cs = m_curveSets[i]; |
| 469 | if( !cs->IsPlaying() ) |
| 470 | { |
| 471 | m_curveSets.Remove( i ); |
| 472 | } |
| 473 | else |
| 474 | { |
| 475 | ++i; |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | void TriDevice::DestroyRenderContext() |
| 481 | { |
no test coverage detected