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