Ogre Ode without Ogre

void80

13-07-2010 20:37:20

I have a project where there are a lot of OgreOde::World Objects. I also have one (optional) Renderer, which is an own object. To put it simply, it has all the Ogre stuff to render a scene, especially the root and the SceneManager.

The multiple World objects calculate some physic simulations. The renderer than attaches to one (or more) of the Worlds, to display them.

So basically the problem is that I want to create and use a World Object without any Ogre Objects (especially without the SceneManager). Until now I tried to instantiate the WorldObject with the SceneManager constructor parameter set to nullptr, which worked all right. But when I switch on the Debug Mode (i.e. setShowDebugGeometries(true)) it does no more, because the _manager member is used.

Even if this problem didn't occur, I don't like the situation, because it seems the World does rely on the given SceneManager. For now I added a setSceneManager method for myself to set the SceneManager when attaching the Renderer and I remove the Manager when detaching.

However, I'm still thinking this is not meant to be done. So does anyone have an idea or suggestions for me?