Hi Christian,

> The problem is that the osg::Depth state seems to
> leak out and affect 
> every rendered node while the fade-out is in effect.
> After the node is 
> removed from the scenegraph, everything is back to
> normal.
> 
This is sometimes a normal behaviour (as I shortly
found out ;), because the applied state is not
returned back after traversed the graph.

You could help yourself if you just add the correct
depth attribute to the parent of your node which
should be faded out. For example:
A is to fade out. P is parent of A, then you do:
A->stateattribute->(new osg::Depth(0,1,false)) // or
whatever you had before

P->addChild(A)
P->stateattribute(new osg::Depth()) // or whatever are
correct values for proper depth handling.

I think this helps. Try it out.

Best regards,
Art




> If I set the osg::Depth state right from the start
> when creating the 
> node (and before rendering for the first time), I
> get the expected 
> results, without state leakage (but obviously
> z-buffering doesn't work 
> for the node).
> 
> Is there something general I'm doing wrong, or is it
> rather something 
> specific to the way I build my scene graph? Perhaps
> some information has 
> to be rebuilt after changing state attributes, which
> doesn't happen 
> automatically? At the moment I'm clueless where to
> start. I'm using OSG 2.2.
> 
> thx for advice
> christian
> _______________________________________________
> osg-users mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 



      E-Mails jetzt auf Ihrem Handy.
www.yahoo.de/go
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to