Worldgeometry is not supported by the generic scenemanager

sjaak_vejr

31-12-2007 16:59:08

Hello,
I have a problem with tutorial 3. I looked in the forum but I didn't find an answer. So who can help me?

I followed the instructions in the tutorial but de line:

win.SceneManager.SetWorldGeometry("terrain.cfg");

gives a runtime error.

In the log file

17:35:10:OGRE EXCEPTION(2:InvalidParametersException): World geometry is not supported by the generic SceneManager. in SceneManager::setWorldGeometry at ..\src\OgreSceneManager.cpp (line 1312)

In logfile I see:
17:35:10: Installing plugin: Octree & Terrain Scene Manager
17:35:10: Plugin successfully installed

So that seems to be ok.

Any idea?
Thanks
Sjaak Verwaaijen

Marioko

31-12-2007 18:42:39

are you creating the SceneManager like this?

SceneManager = root.CreateSceneManager(SceneType.ST_EXTERIOR_CLOSE);

sjaak_vejr

01-01-2008 12:50:29

Thnak you.
problem is solved

Marioko

01-01-2008 13:03:58

ok :D

jimburnettva

07-09-2010 18:24:50

Here is another fix for those wondering what "could" have fixed this problem.

I personally was using OgreWindow win = new OgreWindow(); instead of MyOgreWindow win = new MyOgreWindow();

The CreateSceneManager() method was never getting run so the default SceneType was being used instead of the one defined in this method! Woops! :-)

static void Main()
{


try
{
// OgreWindow win = new OgreWindow(); //*********Wrong OgreWindow class. WOOOPS! ********/
MyOgreWindow win = new MyOgreWindow(); //This is the correct one to use. :-P
new SceneCreator(win);
win.Go();
}
catch (System.Runtime.InteropServices.SEHException)
{
if (OgreException.IsThrown)
MessageBox.Show(OgreException.LastException.FullDescription,
"An Ogre exception has occurred!");
else
throw;
}
}

Beauty

07-09-2010 21:53:57

Hi jimburnettva,
welcome to our Mogre forum ... and thanks for your bug report :D

But as I can see, there is still the right code on the wiki page Mogre basic tutorial 3. And there was no edit at this part of code for a longer time.

Where did you get the buggy you tutorial version?
Maybe you found the bug in the zip file of user smiley80 which contains running VS projects of the tutorials?

jimburnettva

07-09-2010 22:00:49

Beauty,
Actually, I was following the Tutorial line by line, word for word EXCEPT....I was just keeping the same project open and made some assumptions that the tutorial would use some of the same classes.

One tutorial uses OgreWindow and another used MyOgreWindow (I think?)....and I didn't change this from one tutorial to another. I was just posting a possible solution for the next guy that does a search on the forum.


-JB

Beauty

08-09-2010 00:30:57

Ok, I check the other tutorials for this class names later.
Thanks for your report :D