Hi Daniel,

On 27 April 2012 09:31, Daniel Schmid <[email protected]> wrote:
> I’m using SilverLining-SDK to render clouds and athmosphere, and I HAVE to
> render clouds in the PostDrawCallback. I do not use precipitation of
> SilverLining, I decided to use osgParticle::PrecipitationEffect. The
> precipitation MUST be drawn the very last, otherwise there are transparency
> issues and snowflakes are drawn opaque.
>
> So I need to draw the precipitation in a Camera PostDrawCallback. How can I
> use the osgParticle::PrecipitationEffect class and its PrecipitationDrawable
> and integrate it / call it from a PostDrawCallback ?

To do this you'd have to have a custom cull traversal and apply the
state and then call the drawable. It's rather messy.

Why not just use the OSG's inbuilt ability to use multiple render bins
and place the bin number after everything else.  To get SilverLinning
to work with this you'd need to also create a custom Node and Drawable
to wrap up the required calls but this isn't difficult, again you can
use rendering bins to control the ordering.

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

Reply via email to