TerrainReady

Sarev0k

11-02-2006 11:14:55

I know that its possible to determine when the terrain is fully loaded using the PagingLandscapeListener & ListenerManager classes, but this doesn't work well for me because I don't want my project to have to link to the PLSM (I just want to use it the Ogre's plugin mechanism).

So I was wondering if it would be possible to make the mTerrainReady flag thats being set in the PagingLandscapePageManager class accessible through the SceneManager's getOption function?

This would allow me to query the SceneManager every frame to see if the terrain has loaded yet.

Thanks for your help

tuan kuranes

11-02-2006 12:25:37

last plsm2 version doesn't link to lib due to uses of delegates instead of listener inheritance.

Plus, last version has a "loadnow" setoption, that may achieve what you need, if you want to fully load terrain at startup.

Sarev0k

11-02-2006 16:48:27

I'm looking through the source and I can't seem to figure out how to take advantage of the delegates. Could you provide an example of how one might subscribe to your delegates without linking?

Thanks

tuan kuranes

11-02-2006 17:37:37

plsm2 demo uses delegates.

Crashy

14-03-2006 19:05:33

It seems that the loadNow option is no more working with Ogre 1.2: The pages are not loaded as before(every pages loaded at the same time).

Now some pages are loaded, and it takes a few frames to have the needed pages loaded.

tuan kuranes

15-03-2006 09:01:05

strange, it works here. camera must be created before calling it and maxpreloadpage == height*width.
(i've fixed that to >= in CVS just in case)

Crashy

15-03-2006 12:17:02

:roll: It works, it was my own fault, sorry.(value was greater than height*width, it worked before, maybe with luck). Thanks a lot.