On Fri, Aug 24, 2012 at 9:24 AM, Alexej Fink <[email protected]> wrote:

>
> gwaldron wrote:
> >
> > No, you need to apply it on the drawables, otherwise they will still get
> culled.
> >
> >
> > I created some utilities to support DrawInstanced usage in osgEarth,
> including a visitor that will apply the static bounding box to drawables.
> Perhaps it would be useful to you:
> >
> >
> >
> http://github.com/gwaldron/osgearth/blob/master/src/osgEarth/DrawInstanced(
> https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/DrawInstanced.cpp
> )
> >
> http://github.com/gwaldron/osgearth/blob/master/src/osgEarth/DrawInstanced.cpp(
> https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/DrawInstanced.cpp
> )
> >
>
>
> Do I understand your approach right: That you set the same "static" bbox
> for each drawable by setting the same calcBBox callback for a group of
> Drawable instances?
>
> If so. Although this is an other interesting work around. It still does
> not reduce the culling effort visiting each Drawable instance, which I
> would like to avoid, since it is meaningless in my setup -- culling on the
> parent group node would be sufficient. Can I use some cull-callback to
> prevent the culling visitor to go deeper to the single Drawables and cull
> based only on the group node bbox?


Look at CullVisitor::apply(Geode&) to see how it works.

I believe your drawables have to return a valid bound since CV uses that to
calculate near/far clipping planes, renderleaf depth, etc.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to