2 problems


19-05-2010 00:40:49


i have currently 2 problems with PagedGeometry.

1. i use more then one OgreSceneManager. on this case i get a crash because on this crazy hack =)

uint32 ImpostorPage::selfInstances = 0;
void ImpostorPage::init(PagedGeometry *geom, const Ogre::Any &data)

if (++selfInstances == 1){
//Set up a single instance of a scene node which will be used when rendering impostor textures

so only one times creates this nodes for one SceneManager. other SceneManager dont have this ones and crashes.

Is PagedGeometry only useable for one SceneManager? i dont hope so ....


i have a problem with wrong postions of objects in terrain (or missing objects) if i use following code

... new TreeLoader3D(geom, TBounds(0, 0, 255, 255));

if i use "geom->setPageSize(100)" its all fine.

is this ok? dont really understand this. or what values are right for the page size?

i hope the description is enough.



20-05-2010 13:30:19

Problem 1: Feel free to try it, just comment out the if-statement in the init method and the dtor. If it seems to work fine for you, then let us know. If it doesn't work, feel free to submit a patch. :)

Problem 2: Are you using the latest source release from mercurial? I can't seem to find the setPatchSize method and I don't have access to the svn at the moment.



20-05-2010 16:41:19


thanks for the answer!

1. ok no problem to make a fix. but only to comment out the if statement is not the solution ;-).
first step want to know if this statement is correct or if someone has already a patch.
i try to make patch for it.

2. oh sorry wrong function name :( right name is "setPageSize" ;-)


20-05-2010 18:36:15

Problem 2: I'm using bounds of 0, 0, 256, 256 and a page size of 180. If I drop page size to 60 I see pages popping but everything seems to be in the right location. I know that doesn't help you, but I'm unable to reproduce it. A repro case might help.

- Fish


20-05-2010 23:59:48


I test some values.
Seems like the Bounding size is not depending on this error.
For me ONLY page size 100 works ... can not be luck.
I places 200 trees in diagnale line with a constant offset. if i use other values for page size, some trees are anywhere and the other trees have a wrong offset between 2 trees as they should (difference of this wrong offset is depending on the page size value).
for example:
x = tree
- = distance unit
x-----x-----x-----x-----x : right order
x--x--x--x--x : my order with page size != 100

Don't know whats wrong or why the page size has effect of the positon of the trees...
What is the reason thats only works with a page size of 100? Thats really crazy...

Thanks Fish for testing it so fast!