| 674 | //----------------------------------------------------------------------------- |
| 675 | |
| 676 | bool SceneManager::_setLightManager( LightManager* lm ) |
| 677 | { |
| 678 | // Avoid unnecessary work reinitializing materials. |
| 679 | if ( lm == mLightManager ) |
| 680 | return true; |
| 681 | |
| 682 | // Make sure its valid... else fail! |
| 683 | if ( !lm->isCompatible() ) |
| 684 | return false; |
| 685 | |
| 686 | // We only deactivate it... all light managers are singletons |
| 687 | // and will manager their own lifetime. |
| 688 | if ( mLightManager ) |
| 689 | mLightManager->deactivate(); |
| 690 | |
| 691 | mLightManager = lm; |
| 692 | |
| 693 | if ( mLightManager ) |
| 694 | mLightManager->activate( this ); |
| 695 | |
| 696 | return true; |
| 697 | } |
| 698 | |
| 699 | //----------------------------------------------------------------------------- |
| 700 |
nothing calls this directly
no test coverage detected