Hi Farshid,

In scene graph osg::Camera have a bounding volume like all other nodes
and are culled accordingly, there are some special rules though - if
the Camera has an ReferenceFrame set to ABSOLUTE_RF then it's bounding
volume is ignored and it's not culled.

If you fit this case, or if the bounding volume of the Camera is
larger than you need for your texture then a cull callback attached to
a node above the Camera is probably something to use, this could then
keep a bounding sphere to do the cull against the view frustum and
make the decision about whether to cull the subgraph or not.  Such a
cull callback could be used in more circumstances than with just a
camera.

Robert.

On Thu, Jun 17, 2010 at 2:43 AM, Farshid Lashkari <[email protected]> wrote:
> Hello,
> I have an app where I use an osg::Camera object to render a view of the
> scene to a texture, then apply that texture to node in the scene. If the
> node displaying the texture is culled, the osg::Camera object still renders
> the scene to the texture.
> Is there a clean way to prevent the osg::Camera object from rendering if the
> node displaying the texture is culled?
> I'm able to accomplish this manually, but it's not as nice of a solution as
> I hoped. Before each draw I manually check if the bounding sphere of the
> node is inside the current view frustum, and disable the osg::Camera object
> accordingly.
> Just curious if somebody knows of a better way to accomplish this.
> Cheers,
> Farshid
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to