[osg-users] osgPPU and multiple processor

Art Tevs stud_info2 at yahoo.de
Fri Sep 26 13:56:15 PDT 2008


Hi Alexandre,

I have never tried to alternate osgppu's processors dynamicly while rendering. I am not sure if it is a good idea at all (even also for other kind of osg nodes), since osg provides a mechanism called osg::SwitchNode which do the trick.

Could you try to use the SwitchNode as a parent node for the processors. This will force to render only the active processor hence changing effects on the fly. I think this wouldn't make troubles, however I am not sure ;)

If this doesn't help, could you then provide me with a small example code reproducing the error. This would be helpful to eliminate the issue.

Cheers,
art


--- alexandre amyot murray <alex.amyotmurray at gmail.com> schrieb am Fr, 26.9.2008:

> Von: alexandre amyot murray <alex.amyotmurray at gmail.com>
> Betreff: [osg-users] osgPPU and multiple processor
> An: osg-users at lists.openscenegraph.org
> Datum: Freitag, 26. September 2008, 21:16
> 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
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 



More information about the osg-users mailing list