Rendering before calling setWorldGeometry

Sarev0k

02-02-2006 06:33:12

Hello, I'm using the PLSM for the project I'm working on and there is some time that passes between when I start the application and when I wish to setWorldGeometry (load a map). At the beginning of my application, I just want to render the GUI, and give the user a choice of which map he loads.

The problem I'm eperiencing is a nasty assert that occurs every time I try to render the scene inside of ogrepaginglandscapescenemanager.cpp inside the _updateSceneGraph method reading the following


void PagingLandScapeSceneManager::_updateSceneGraph(Camera * cam)
{
// entry into here could come before setWorldGeometry
// got called which could be disastrous
// so check for init
assert(mPageManager);


Should I call setWorldGeometry and just pass in a blank string to accomplish the functionality I desire or is there some other method I'm not aware of?

Thanks

OvermindDL1

02-02-2006 07:04:30

Don't load PLSM2 as the scenemanager yet, just use generic (usually octree), it can do nothing like you want, then when you load the level, then load the terrain. You could also make a tiny terrain (for low-memory use) and just have the camera face away from it. As well as just have the gui encompass the whole screen so you see nothing behind it.

EDIT: Although it would be nice if PLSM2 could just not render terrain if it does not have it setup. :)

tuan kuranes

02-02-2006 12:16:13

You should look on ogre forum an wiki about "StateManager".
It's exaclty what you need.