Scene wont load

Nudel

31-05-2006 15:10:47

Ive finaly managed to include the scene loader libraries without getting compiling errors, but if i run the programm, nothing appears.
Im using the unmodified
exampleApplication.h,
ExampleFrameListener.h,
IOSMSceneCallbacks.h,
OgreOSMScene.h,
OgreOSMScene.cpp
and the whole TinyXML folder(6 files).

The main function creates an oSceneLibApplication object and runs it(app.go)

Following code is inside the createScene Function of oSceneLibApplication. The path parameter of oScene.initialise() is the only thing i changed as far as i remember.

void createScene(void)
{
OSMScene oScene;

oSceneCallback oe_Callback;

oScene.initialise("models\\testscene\\test.OSM", &oe_Callback);

oScene.createScene();

mSceneMgr = oScene.getSceneManager();

mCamera = mSceneMgr->createCamera("PlayerCam");
mCamera->setPosition(Vector3(0,50,500));
mCamera->lookAt(Vector3(0,0,0));
mCamera->setNearClipDistance(5);

Viewport* vp = mWindow->addViewport(mCamera);
vp->setBackgroundColour(ColourValue(0,0,0));

mCamera->setAspectRatio(
Real(vp->getActualWidth()) / Real(vp->getActualHeight()));

}

This results in a black screen. Only the stats(polygon count) in the left bottom corner are shown. If i create an entity and scene node myself and add them to mSceneMgr, the objects will be loaded.
Is there a function that returns all scene nodes attached to mSceneMgr so i can check, if the scene nodes and meshes were added to the scene manager?

Lioric

31-05-2006 16:03:36

Is the scene and its support files (meshes, materials) inside your resource folder locations?
Is that path registered with the resource system (i.e. declared in the resource.cfg file)?

What are the contents of the generated ogre.log file? look for the section about the "Scene Loader" process

To get the loaded entities, you can use the "getEntitiyList" method of the scene loader object

Nudel

31-05-2006 17:46:54

Thanks a lot, the ogre.log helped to find the error.
I didnt know that the path in the *.osm file does not point to files inside the same directory as the *.osm but to files in directories defined in ressource.cfg.