Hi Marlin,

On 2 May 2018 at 18:05, Rowley, Marlin R <marlin.r.row...@lmco.com> wrote:

> Is there a way to get a pointer to the main rendering camera without
> passing the Viewer around through classes and functions?
>

In the draw traversal the main two objects that are passed around are
osg::RenderInfo and osg::State.  The osg::RenderInfo has high level info
such as what is the current View being rendered and what the current Camera
is.


https://github.com/openscenegraph/OpenSceneGraph/blob/master/include/osg/RenderInfo

The RenderInfo is passed to drawables during the draw traversal via:

      osg::Drawable::drawImplementation(osg::RenderInfo&)

The CullVisitor also has a handle to the RenderInfo as well as various
other useful state info:


https://github.com/openscenegraph/OpenSceneGraph/blob/master/include/osgUtil/CullVisitor

Robert
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to