Using Ogre Native SceneManagers possible?


03-03-2011 02:13:21


i'm writing a fairly convoluted game. As my game runs now there are different scene types, with different scenemanager requirements. I have one scene which I'd like to use PCZ with to cull indoor scenes a little better, but I have a few other scenes where i'd rather not deal with the complexity of integrating PCZ into, as they are already well advanced with factories and loaders and whatnot.

I'm running into a strange issue right now. As soon as I load the plugin, it appears that PCZ is overriding Ogre::Root::createSceneManager(ST_GENERIC)

When I create a PCZ Scenemanager, everything works well. However, when I attempt to create the camear (SceneManager::createCamera()) on a ST_GENERIC scenemanager, it overrides Ogre::Camera with PCZCamera. or SceneNode.. I can't tell exactly.. Either way, when you call Ogre::renderOne() it subsequently calls

PCZone* cameraHomeZone = ((PCZSceneNode*)(cam->getParentSceneNode()))->getHomeZone();

followed by

PCZone* PCZSceneNode::getHomeZone(void)
return mHomeZone;

So Tho, i never create anything of type PCZSceneNode, nor a PCZ SceneManager. Here is the code that initiates the Ogre::SceneManager

mSceneManager = Ogre::Root::getSingletonPtr()->createSceneManager(Ogre::ST_GENERIC);

If I simply do NOT include the plugin (And do not reference it in any plugin.cfg of course)


line, it works perfectly.

So.. ideas?