Sorry for my bad English
In the project we use more than two active RenderTargets (vieports) associated with different scene managers .
In release build (sometimes) application has crashed.
In debug build - a see asserts in QueuedRenderableCollection::addRenderable()
I was shoked . It's meens something make invalide map-conteiner (make modiffication of Pass-object without before erase Pass from mGrouped)Error inserting new pass entry into PassGroupRenderableMap
I tried to find what the problem is.
This diagram show of the most important functions call:
Code: Select all
OgreRoot::renderOneFrame() | | +->RenderTarget::update() | | +->SceneManager::_renderScene() | | +-->ControllerManager::updateAllController() | | | | | +-->Pass::_dirtyHash() | | | +-> ...msDirtyHashList.insert(Pass* p) | +-->prepareRenderQueue() | | | | | +-->RenderQueueGroup::clear() | | | | | +--...->QueuedRenderableCollection::removePassGroup(Pass* p) | | | | | | | | +--> ... mGrouped.erase(Pass* p) | | | | | +-->Pass::processPendingPassUpdates(); | | | | | +->Pass::_recalculateHash(); | | | | | +-> .. msDirtyHashList.clear(); | | +-->... RenderQueue::processVisibleObject() | | +--> ...QueuedRenderableCollection::addRenderable() | +--> ... mGrouped.insert(Pass* p)
1) ControllerManager::updateAllController() - can modiffiy any Pass (even that which is contained in other scene-manager the yet to be processed), and mark it insert to global msDirtyHashList
2) Try to erase dirty Pass, but if Pass-object does not belong to current scene-manager we have a problem, because
3) Call recalulate hash for dirty Pass-object (remember - owner of it other scene-manager)
4) In each iteration for render target (scene-manager in my case) - msDirtyHashList was cleanup. That means - for next iteration, for other scene-manager we are lose Passes for erase from mGrouped map-container. But call recalculateHash previously, it is still all the spoils
use ogre version 1.7.2
I have some question - the problem is still present in the new version? What are the solutions without modifying the core? We use a number of scene-managers to be able to display the main-scene with 3d object and location-map (game radar etc.)