Le 18/11/2011 10:21, Vincent Bourdier a écrit :
Hi,

The update callback is done to be updated each frame in the traverse() method.
Rewriting it is necessary to update it.
So add a callback on the decorator and update it in traverse() method.

Regards,
Vincent
Hi Vincent,
I've already rewrited the traverse function of my decorator to allow the updating of my shader but I don't understand why the update callback isn't called automatically. If the "node1" has only one parent, the "decorator" node, the update callback works but if the node1 has two parents, the root and the decorator nodes, the update callback isn't called. Why ?

Regards

Fabrice


Le 18/11/2011 09:39, xbee a écrit :
Hi all,
I'm trying to make "blinking" a part of my scene by adding a "decorator" node (a group node with a shader) like this:

Original graph

     root

      |
   _     _

   |     |

node1   node2


"decorated" graph

     root

      |
   _      _   _

   |      |   |
 deco     | node2
     \    |
      node1


So I add a deco node to the graph and add the node1 as child of deco node. Everything seems ok, my node1 is colored as needed by when I try to animate the decorator (add an update callback to the uniform , to the stateset or to the group node with a color change) nothing is updated, the callback isn't called. So, is there some restrictions on the update callback call ? A way to force the update ? Currently, I've found a workaround by rewriting the traverse function in my decorator node, but I am not very happy with this solution.


Fabrice



_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to