[osg-users] PrecipitationEffect not updating - problem solved

Murray Curtis murray at dragtag.com.au
Sun Jul 20 19:40:01 PDT 2008

Found it. I had failed to add my view to the composite viewer so even 
though an update callback reported valid framestamps from the visitor, 
the precipitation node was not being updated (or updated incorrectly).

I have several of osgViewer::View each with differing viewports all 
sharing a common osg::GraphicsContext. Only one of the views needs to be 
added to my osgViewer::CompositeViewer to make all of them visible. 
Thats what caught me out. Is that expected behaviour?


> Hi Murray,
> Does osgprecipitation work fine?
> As for what might be missing from update in your case, well you have
> the source code.  BTW you can set your own UpdateVisitor if you wish
> via viewer.setUpdateVisitor(mySubclassedFromUpdateVisitorObject);
> Robert.
> On Fri, Jul 18, 2008 at 2:23 AM, Murray Curtis <murray at ...> wrote:
>> I'm having trouble getting osgParticle::PrecipitationEffect to update. I get
>> particles that just sit stationary in mid air but they do die (fade off)
>> after a few seconds.
>> I added an update callback to the precipitation node and can confirm its
>> getting a valid (updating) framestamp.
>> I'm using a composite viewer with two views in a shared graphics context. I
>> don't use the viewers run() method but I do run an update traversal (
>> _primaryRoot.get()->accept(updateVisitor);) as confirmed by the callback
>> above.
>> Is there another part of the update I'm missing?
>> A trivial test program:
>>    precipitationEffect = new osgParticle::PrecipitationEffect;
>>    group->addChild(precipitationEffect.get());
>>    viewer.run();
>> works perfectly.
>> I'm using OSG 2.5.4 on Linux.
>> Any pointers much appreciated.
>> Murray Curtis
>> Tag Systems
>> Melbourne
>> Australia
>> (Irony: We're in the worst drought in Australia's recorded history and its
>> raining for real outside...)
>> _______________________________________________
>> osg-users mailing list
>> osg-users at ...
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list