[SOLVED] Load Screen / multiple levels

azteke

14-12-2006 20:49:00

I am new to Ogre and OgreDotNet, and I am using C# as programming language. My simulation is completely independent from the ExampleApplication framework. I'm wondering if, and how it is possible to create a loading screen and how to clear the scene and start another map/level/scene.

What I tried to do is to call mSceneManager.ClearScene(), and recreate the original scene, but this crashes the application (Do I have to call root.createSceneManager() again? Regarding the loading screen: I don't have the faintest clue how to achieve this.


I've tried using the search but nothing relevant seems to pop out of the search engine. Can anybody help me with these two issues?

Thanks!

azteke

11-01-2007 07:34:12

OK, I found how it can be done:

public void destroySceneManager()
{
mSceneManager.DestroyAllCameras();
mSceneManager.ClearScene();
mRoot.DestroySceneManager(mSceneManager);
mRenderWindow.RemoveAllViewports();
}

Then it is possible to recreate the scenemanager and cameras by calling scenemanager = root.createscenemanager(); and attaching camera's, viewports and leveldata.