|
Hi
Vadim,
Unfortunately, I don't have a solution for your problem. I've seen it
too, although on my kind of application it doesn't have any importance, so I was
happy to ignore it.
However, I have noticed that the time to add / remove an object from a
live scenegraph depends very much on the complexity of the scenegraph, and not
on the complexity of the geometry itself. If you can reduce the complexity of
the scenegraph by colapsing some groups (transform groups, branch groups) that
will help a lot.
Another approach will be to use a Switch above the objects you want to
add / remove. The ideea is to add the object to the switch in an invisible
state, then toggle the switch mask so that the new object is visible and the old
one that you want to remove to be invisible, and after that invoke the remove on
the branch that you want to remove. Unfortunately, even in the second case the
cpu will be overloaded, so I think that the only solution is the first one, to
have simpler scenegraphs, maybe combined with the second
one.
Last,
there are no such problems in immediate mode, where you have (almost) total
control, but working in pure immediate mode is not so nice and easy as with
secenegraph mode, thus I'm not really recommending it.
Kind
Regards,
Florin
|
