Thanks Johannes,
It works well for me also in anaglyphic.

The troubles comes when you are using Quadbuffer stereo as it needs a
different GL context initialisation...

So far to switch at runtime I need to recreate the view.

Regards,
Pierre.

2010/9/17 Johannes Scholz <[email protected]>

> Well, without diving into details, I also added the ability to switch
> on/off stereo during runtime in my application. I didnt test it using
> quadbuffer so far(!), but it works very well for cyan/red stereo. I didn't
> try using osg::DisplaySettings::instance()
>
> What I do is:
>
> // Check if the mainView has a DisplaySettings object, otherwise create
> if (_mainView->getCamera()->getDisplaySettings()== 0) {
> _mainView->getCamera()->setDisplaySettings(new osg::DisplaySettings());
> }
>
> To enable stereo:
> _mainView->getCamera()->getDisplaySettings()->setStereo(true);
>
> To disable stereo:
> _mainView->getCamera()->getDisplaySettings()->setStereo(false);
>
> Nothing more, nothing less.
>
> Best regards,
>
> Johannes
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31788#31788
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to