Hi Robert, On Sat, 2004-01-10 at 19:50, Robert Hinn wrote: > Hi, > > I finally got it working: The scene graph is replicated, and changes > during runtime are also replicated. It took me some time to figure out > the *Ptr->dcast() stuff, I was a bit puzzled at first that I couldn't > simply cast variables the usual way ;-)
Yeah, the Ptrs hide a bunch of stuff, but transparent downcast is not one of them. Maybe once we can overload dynamic_cast... ;) > Like you suggested, I solved the "finding the root node" problem by > registering a functor with the remote aspect. It took me a while to > figure out that I had to listen for the change of a Name type > FieldContainer, not the creation of a Node (or Name... upon creation the > Name is empty...). OK. > So my first steps in OpenSG are working out well so far, but I still got > one problem: All runs well until I change something on my client side, > e.g. creating a node. I thought about the following: > receiveSync > add client-only nodes > show scene > remove client-only nodes again > clear change-list > > However, upon removing the nodes, I get "subChild: not one of my > children"-like warnings. So I changed this to: > receive sync > show scene > clear change list > while managing an additional scene (just a NodePtr) with additional > nodes. However, even without trying to add them to the root node of the > scene graph, my client hangs whenever I try to create a new node. I even > tried clearing the change-list immediately afterwards, before displaying > the scene, and before receiving the next sync, but to no avail. I'm not > using any beginEditCP() and endEditCP() calls on the client side, only > on the server side (I want the server to manage the scene common to all > clients, and the clients just to add some additional individual nodes, > which aren't sent back to the server)... > > Any idea on why my client hangs when creating a new node? In general you should always do begin/endEdits, otherwise some internal inconsistencies might appear that can lead to crashes. They are needed not only for Cluster situations, but always. Where exactly does it hang? During rendering after the changes or during the creation? The subChild warnings sound like you add your client Nodes to the global root. That might be a problem, as the child list of that Node is updated from the server. It should work better if you create the real root on the client's and add the server's root as a child of that. You can then add other children on the same level and they should not interfere. > Thanks a lot so far, without your (and Rasmus') help, I wouldn't have > realized that I had to search for the root node on the client side! Yeah, that Clustering is not really designed for these distribution problems, but it's pretty general. > PS: the makeTorus() function doesn't seem to add the created node to the > change list, it only worked when I created the geometry and node > separately like in the testRemoteAspect example... Is this on purpose? Hmm, that's surprising. It should, and it certainly is in the code to do that. I'll add it as a bug report. Thanks Dirk ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users