[osg-users] osgPPU and multiple processor

alexandre amyot murray alex.amyotmurray at gmail.com
Fri Sep 26 12:16:27 PDT 2008


Hi,

I was wondering if it's a good practice to build 2 or more ppu graph and
then altern them to render differents effects.

Example :

I instanciate a osgPPU::Processor * processor1 and add some unit to it :

processor1->addChild(  osgPPU::Unit* aUnit )
processor1->addChild(  osgPPU::Unit* aUnit )
processor1->addChild(  osgPPU::Unit* aUnit )
...
processor1->addChild( osgPPU::UnitOut* ppuOut )

and then a second osgPPU::Processor * processor2 and add different unit to
it :

processor2->addChild(  osgPPU::Unit* aUnit )
processor2->addChild(  osgPPU::Unit* aUnit )
processor2->addChild(  osgPPU::Unit* aUnit )
...
processor2->addChild( osgPPU::UnitOut* ppuOut )

Now my application need to cange the effect every 45 seconds, so when its
time I remove the current processor from my main osg::Node and add the
second processor to it.

Is this ok to do this ? It seems to work fine for a while but then a random
crash appears in the viewer_.frame() call just after I switch processor.

This crash never come if I dont alternate processor1 and 2.

thanks again

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080926/24b20c9a/attachment-0002.htm>


More information about the osg-users mailing list