MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _setLightManager

Method _setLightManager

Engine/source/scene/sceneManager.cpp:676–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674//-----------------------------------------------------------------------------
675
676bool 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

Callers

nothing calls this directly

Calls 3

isCompatibleMethod · 0.45
deactivateMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected