Hi Rafa,
The DisplaySettings on each osgViewer::View will be NULL unless you assign
one. If you don't assign one that internally it'll use the
DisplaySettings::instance() singleton.
So you could just do:
DisplaySettings::instance()->setStereo(true)
Or you could do a
view.setDisplaySettings(new DisplaySettings);
If you want to control just one view then assigning a local one is what
you'll need.
Robert.
On 5/10/07, Rafael J. Martinez <[EMAIL PROTECTED]> wrote:
Hi all,
My application is intended for displaying some kind of 2D information,
with
text and some pictures, and several 3D models in a corner of the screen.
The
application will enable horizontal split stereo.
I've played with the CompositeViewer in order to use two independent
views,
one for implementing the main hud, an another with two cameras for the
left
and right eye. Although I am still at the beginning, I am sure there is
something I miss, since I am not able to access the DisplaySetting to
enable
stereo just in the second view (getDisplaySettings() returns NULL).
Al would very much appreciate if someone could address me in solving my
issues. Here you have a brief description of what I did:
osgViewer::CompositeViewer viewer;
{
osgViewer::View* view = new osgViewer::View;
viewer.addView(view);
view->setSceneData(cow.get());
view->setUpViewOnSingleScreen(0);
osg::DisplaySettings* ds = view->getDisplaySettings();
// ......
}
{
osgViewer::View* view = new osgViewer::View;
viewer.addView(view);
osgViewer::Viewer::Windows windows;
viewer.getWindows(windows);
if (windows.empty()) return 1;
osg::Camera* cameral = view->getCamera();
cameral->setViewport(0,0,500,500);
cameral->addChild(cessna.get());
cameral->setGraphicsContext(windows[0]);
view->setCamera(cameral);
osg::DisplaySettings* ds = view->getDisplaySettings();
// ......
}
Thanks in advance,
Rafa.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/