[osg-users] Render passes and stereo handling

2012-10-08 Thread Gaurav Chaurasia
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 dra

Re: [osg-users] Render passes and stereo handling

2012-10-08 Thread Wang Rui
Hi Gaurav, A possible solution I think (but never tested it) is to set a draw callback to left/right render stage (stages can be obtained from camera->getRenderer()->getSceneView()->getRenderStageLeft(), and then use RenderBin::setDrawCallback... Oops). And you may know if left or right render sta

Re: [osg-users] Render passes and stereo handling

2012-10-09 Thread Robert Osfield
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 wrote: > Hi, > Is there a way to know which eye (left/right) is currently being drawn inside > osg::Camera::DrawCallback. There

Re: [osg-users] Render passes and stereo handling

2012-10-10 Thread Jean-Christophe Lombardo
Hi Robert, As far as I understand, most of the stereo mode (at least quad buffer and horizontal/vertical split) use the same camera to render left and right eye. I did not find any flag on the camera neither on the RenderInfo to actually know which eye is being rendered. Did I miss something