Hi,
Here are some thoughts in general.
I just checked in details the current implementation of Switch and associated interaction of modification manager with the switch. It really looks like here is a kind of design flaw: if I change state of the switch on the fly, modification manager does not get notified of such a change (OK, this part is supposed to be here but calls are commented out (or just not completely implemented)). Even more, if I pass BitSet (that is mutable) to setChildMask and after change its bits, there is no way to notify modification manager about such change, so scene will not get re-culled and will be rendered in previous state (this is a case for my app, indeed).
Former version of Xith3D was regenerating a list of atoms for every frame, which has been treated as performance bottleneck (and practically it is), so it even potentially (by-design) had no such problems as handling changes in mutable non-Xith3D objects passed to the rendering core (added to scenegraph) by-reference, so theoretically I could have single BitSet to control mutliple switches over the scene (example: I have multiple items on different levels that show up after I complete some task, availability of all items controlled by same BitSet, besides items themselves reside in different subgraphs).
Practically, introduction of Modification Manager will lead us to the same (by concept) architecture as Java3D, where atom list modifications are driven by events generated on scenegraph changes and delivered to the renderer via kind of delaying queue (i.e. the steps are “collect changes”, “apply changes to the atom list”, “render atom list”), which is beneficial only for relatively static scenes, while highly dynamic scenes (with hundreds or thousands nodes altered per frame) will only loose performance with this. So applications like Quake Benchmark and other walk-through games will sure benefit from the Modification Manager, while some others will degrade in performance.
Java3D is trying to improve this by introducing Rendering Hints (such as “dynamic”, “static”, “can read”, “can write”, etc.).
At the moment, ALL the rendering in new Xith3D core implementation became Modification Manager-centric. I have no problems with all these things, except that it should be a support for no-queue scenegraps also (which is a great benefit for beginner developers also, because of they do not have to worry about of all these mutable/immutable stuff, setting changed flag if the change something, etc.)
Option for apps like mine can be to add a global option that will force scenegraph recull on every frame rendered without even touching modification manager.
[thoghts interrupted by external event ]
Yuri