Hello Christian,

[EMAIL PROTECTED] wrote:
> Hi to everyone.
> I have some problems with managing the scenegraph with 2 threads.
> Since I had problems, I tried to follow the tutorials in the chapter 
> "multithreading".
> I made the example program work (the one that renders a torus and 
> rotates it with a secondary thread that possess a second aspect of the 
> scenegraph).
> Then I changed this little program in this manner: instead of rotating 
> the torus, I made the torus "flicker" by calling the node->setActive() 
> (true or false alternatively) with the second thread. The problem is 
> that this modification don't work!
> Instead, I got this warning: "recurse: core is Null, don't know what 
> to do!"
> 
> So, this is what I think:
> - I haven't understood how aspects work :)
> - there is a field mask to set when calling the node->setActive(), but 
> I haven't found which

this one is a bit tricky, I have to admit. The setActive method is only
a convenience/backwards compatibility wrapper for the traversal mask, so
you need to use that field's mask:

beginEditCP(someNode, Node::TravMaskFieldMask);
        someNode->setActive(false);
endEditCP(someNode, Node::TravMaskFieldMask);


> - aspects don't manage all the modifications of the scenegraph
> - (other)
> 
> If I use the aspect #0 instead of #1 everything works...
> Can someone help me?

Hopefully adding the above does the trick. If you are unsure whether a
field mask is responsible for a problem, you could try to not use
explicit masks and see if that makes a difference, i.e. just use

beginEditCP(someNode);
        someNode->setActive(false);
endEditCP(someNode);

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to