From acee7ccaeef4148991720b348a2039d6e35aafe7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Apr 2007 14:40:39 +0000 Subject: [PATCH] From Laurens Voerman, "I've added the code to set up quad_stereo properly. I have tested with WinXP / VC8, stereo is working. I also added code to set sampleBuffers and samples. These cannot yet be properly set, tested (windows only ) by changing _numMultiSamples in DisplaySettings::setDefaults() and recompiling." --- src/osgViewer/View.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index 1ea5f8f56..6f5ce3dee 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -111,7 +111,11 @@ void View::setUpViewAcrossAllScreens() traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; - + traits->sampleBuffers = ds->getMultiSamples(); + traits->samples = ds->getNumMultiSamples(); + if (ds->getStereo() && (ds->getStereoMode() == osg::DisplaySettings::QUAD_BUFFER)) { + traits->quadBufferStereo = true; + } osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); _camera->setGraphicsContext(gc.get()); @@ -170,6 +174,11 @@ void View::setUpViewAcrossAllScreens() traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; + traits->sampleBuffers = ds->getMultiSamples(); + traits->samples = ds->getNumMultiSamples(); + if (ds->getStereo() && (ds->getStereoMode() == osg::DisplaySettings::QUAD_BUFFER)) { + traits->quadBufferStereo = true; + } osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); @@ -230,6 +239,11 @@ void View::setUpViewOnSingleScreen(unsigned int screenNum) traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; + traits->sampleBuffers = ds->getMultiSamples(); + traits->samples = ds->getNumMultiSamples(); + if (ds->getStereo() && (ds->getStereoMode() == osg::DisplaySettings::QUAD_BUFFER)) { + traits->quadBufferStereo = true; + } osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get());