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."
This commit is contained in:
@@ -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<osg::GraphicsContext> 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<osg::GraphicsContext> 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<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user