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

Method _setLightManager

Engine/source/scene/sceneManager.cpp:675–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

isCompatibleMethod · 0.45
deactivateMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected