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 ?
jcl
Robert Osfield wrote:
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
--
Jean-Christophe Lombardo Espace Immersif DREAM / INRIA
2004 route des Lucioles - BP93 - 06902 Sophia Antipolis Cedex - France
http://www.inria.fr/sophia/dream C013 Tel.: +33 4 92 38 50 26
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org