[osg-users] Slave camera lighting with disabled main camera

Robert Osfield robert.osfield at gmail.com
Wed Jan 10 07:27:03 PST 2018


HI Ravi,

On 10 January 2018 at 14:53, Ravi Mathur <ravidavi at utexas.edu> wrote:
> I just checked, and the same behavior & solution exists on master.

Looking at the internal setup of the rendering backend I think the
reason for the behavior is that the Renderer implement found in
OpenSceneGraph/src/osgViewer/Renderer.cpp constructor reads the View's
LightingMode and then passes this on to the SceneView's it setups to
do the rendering.  This setup happens when you add the slave cameras.

I think the problem comes in that the osg::View::LightingMode value
isn't passed onto the SceneView's by the Renderer's.

Attached is a modification of src/osgViewer/Renderer.cpp that passes
the View::LightingMode value to the SceneView on each new cull
traversal.

Could you try this out to see if it works, if so I'll check it in.

Robert.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Renderer.cpp
Type: text/x-c++src
Size: 34567 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180110/526dc4af/attachment.cpp>


More information about the osg-users mailing list