Using PLSM2 in my own project

Grom

03-04-2006 00:48:25

I am using OGRE 1.2.0RC1 SDK with Visual C++ .Net 2005 (8.0), and the compatible source off of tuan's site. I also downloaded and added the datasrc, and after compiling the plsm2 solution I ran the mapsplitter. Then, I ran the plsm2 demo, which worked fine. So then, I wanted to program my own demo that uses the plsm2

I copied over and adjusted the applicable cfg files. I let the default map remain at "DefaultMap=HorizonTestMap", which is "HorizonTestMap=hf_129_3" I found this file and had to change the line

FileSystem=../../Media/paginglandscape2/terrains/LandScapeFileName

to

FileSystem=C:/Games/OgreSDK/media/paginglandscape2/terrains/LandScapeFileName

so it wouldn't get an error

Then, I added this code (which i ripped almost directly from the demo source)

void chooseSceneManager(Root *mRoot, SceneManager* mSceneMgr)
{
bool notFound = true;
// Get the SceneManager, in this case the Paging LandScape specialization
SceneManagerEnumerator::MetaDataIterator it = mRoot->getSceneManagerMetaDataIterator();
while (it.hasMoreElements ())
{
const SceneManagerMetaData* metaData = it.getNext ();

/// A mask describing which sorts of scenes this manager can handle
if (metaData->sceneTypeMask == ST_EXTERIOR_REAL_FAR &&
metaData->worldGeometrySupported == true &&
metaData->typeName == "PagingLandScapeSceneManager")
{
notFound = false;
break;
}
}

if (notFound)
{
OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Could not find Paging Landscape plugin. Check if it's in plugins.cfg.", "chooseSceneManager");
}

mSceneMgr = mRoot->createSceneManager("PagingLandScapeSceneManager", "PagingLandScapeDemo" );
mSceneMgr->setWorldGeometry( Ogre::String("paginglandscape2.cfg") );
}


and use that to set the scenemanager. When I compile and run my program, I get one of those silent "please send microsoft an error data report" errors.

Any advice?

OvermindDL1

03-04-2006 01:59:46

Anything seem odd if you Step through that code in the debugger?

Grom

03-04-2006 06:11:31

Actually, the problem was as such. I was playing around with a number of tuan's demos (the cegui mesh viewer, to be specific). In the process of setting up the paginglandscape2 resources and whatnot, i tried the cegui mesh viewer. Then, I unwittingly copied some of these cfg files to my folder. There was some conflict in there, some path I hadn't set up.

Sorry for a wasted post.