Ogre 1.10 bug?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
nickG
Greenskin
Posts: 122
Joined: Fri Jan 20, 2012 6:44 pm
Location: Russia,Moscow
x 1

Ogre 1.10 bug?

Post by nickG »

Scene manager not completely cleanses. Lights,Entities,Billboards still exist on scene

my solution(W.I.P)

Code: Select all

void SceneManager::clearScene(void)
{
    destroyAllStaticGeometry();
    destroyAllInstanceManagers();
    destroyAllMovableObjects();

    // Clear root node of all children
    getRootSceneNode()->removeAllChildren();
    getRootSceneNode()->detachAllObjects();

    // Delete all SceneNodes, except root that is
    for (SceneNodeList::iterator i = mSceneNodes.begin();
        i != mSceneNodes.end(); ++i)
    {
        OGRE_DELETE i->second;
    }
    mSceneNodes.clear();
    mAutoTrackingSceneNodes.clear();


    
    // Clear animations
    destroyAllAnimations();

    // Remove sky nodes since they've been deleted
    mSkyBoxNode = mSkyPlaneNode = mSkyDomeNode = 0;
    mSkyBoxEnabled = mSkyPlaneEnabled = mSkyDomeEnabled = false;

	//Nick.start:why not cleaned?
	destroyAllEntities();
	destroyAllBillboardSets();
	destroyAllBillboardChains();
	destroyAllInstancedGeometry();
	destroyAllParticleSystems();
	destroyAllRibbonTrails();
	destroyAllLights();
	//Nick:end


    // Clear render queue, empty completely
    if (mRenderQueue)
        mRenderQueue->clear(true);
}
it's bug? or needly use another method for complete cleaning?
Post Reply