Hi Gaurav, The DrawCallback gets passed the RenderInfo which has a getCurrentCamera() that you might be able to use.
Robert. On 2 October 2012 14:07, Gaurav Chaurasia <[email protected]> wrote: > Hi, > Is there a way to know which eye (left/right) is currently being drawn inside > osg::Camera::DrawCallback. There is the UserData field in RenderInfo, but I > don't think I can use it for my purpose without having to patch > osgUtil::SceneView.cpp - the patch being that I update UserData before > drawing each eye. > > Actually, I am doing render passes with render targets for a stereo > application. So I need to switch shader inputs like textures,uniforms for > each eye just before the draw call. I figured I can use the PreDrawCallback > for the purpose because it is called inside RenderStage::draw just before the > actual rendering happens. If someone has a cleaner solution, I would be most > grateful. > > Thank you! > > Cheers, > Gaurav > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=50378#50378 > > > > > > _______________________________________________ > 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

