Hi Werner, The initial draw callback is called at the start of the draw traversal for that Camera's rendering graph, this rendering graph is populated by the cull traversal which happens prior to the draw traversal, this includes all the accumulation of all the matrices in the scene graph into final modelview matrices, so changing the Camera's view matrix during the initial draw callback won't affect the rendering result for that frame.
You should set the Camera's view matrix in the update or at latest cull traversal. Have a look at the RTT Camera's in the osgShadow library. Robert. On 18 November 2017 at 16:06, [email protected] <[email protected]> wrote: > Hi all, > I have written some classes for special effects like ambient occlusion or > shadow. > All those classes are using their own prerender cameras. The cameras use the > initial draw callback for updating their view matrices by using the main > cameras view matrix. > Unfortunately it looks like the rendered shadow/ ambient occlusion matrices > correspond to the previous frame. So my guess is that the view matrix of the > main camera isn't updated from the camera manipulator at the time of the > callback. > Is there any better callback I can use for that? > > > _______________________________________________ > 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

