Hi?  Could you please sign with the name you wish to be addressed as
we're all humans rather than automaton.

On Mon, Jun 22, 2009 at 5:32 PM, <[email protected]> wrote:
> How can translate OSG 1.2 to OSG 2.8, the following code???:
>
> osg::ref_ptr<osgProducer::Viewer> m_pViewer;
>
> for (unsigned int i=0;i<m_pViewer->getSceneHandlerList().size();i++)
>
> m_pViewer->getSceneHandlerList().at(i).get()->getSceneView()->setComputeStereoMatricesCallback(new
> CustomComputeStereoMatricesCallback(this->getCurrentCamera(),i));
>
>
> getCurrentCamera() is a function of my class.

Some general guides:

osgProducer::Viewer roughly maps to osgViewer::Viewer.

There isn't a SceneHandlerList() is osgViewer as there is no
abstraction layer required, instead you just get the Renderer directly
from the viewer's Camera. i.e.

  osgViewer::Renderer* renderer = dynamic_cast< osgViewer::Renderer*
>(viewer.getCamera()->getRenderer());
  osgUtill::SceneView* sv0 = render->getSceneView(0);
  osgUtill::SceneView* sv1 = render->getSceneView(1);

Note, you may have two SceneView's be used for each Camera as
osgViewer allows multi-threading of draw traversal in parallel with
the update and cull traversals.

--

Another route entirely for when you want individual camera control of
stereo cameras is to implement the stereo using two Viewer slave
cameras rather than enabling the low level SceneView support for doing
stereo.  Further down the line all stereo will be done at the
osgViewer, so doing this in your own app would be taking the route the
future of the OSG will take.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to