SceneManager::_populateLightList accepts position and radius now, which means if there is a complex structure to traverse each time this method is called, one gets a performance penalty.
I, for now, solved this by providing a listener for all the entities that provides the light list, but that means the usage of the listener concept is blocked for the outside of the SceneManager class.
Would it be acceptible to move the position and radius determination to the insides of this method and expect a SceneNode instead?:
Code: Select all
// in OgreSceneNode.cpp
mCreator->_populateLightList(this, radius, mLightList);
// in SceneManager - new virtual method
void SceneManager::_populateLightList(const SceneNode* node, Real radius, LightList& destList) {
_populateLightList(node->_getDerivedPosition(), radius, destList);
}
I hope I wrote it readable
