From 7679b96b30aedeaed9082feafa26553f5c2570c3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 Sep 2007 13:42:41 +0000 Subject: [PATCH] Fixed SphericalDisplay set up codes to properly manage display host/num --- src/osgViewer/View.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index 7a3279f59..9df6770e3 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -850,8 +850,6 @@ void View::setUpViewFor3DSphericalDisplay(double radius, double collar, unsigned return; } - unsigned int width, height; - wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); osg::GraphicsContext::ScreenIdentifier si; si.readDISPLAY(); @@ -861,6 +859,10 @@ void View::setUpViewFor3DSphericalDisplay(double radius, double collar, unsigned si.screenNum = screenNum; + unsigned int width, height; + wsi->getScreenResolution(si, width, height); + + osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->hostName = si.hostName; traits->displayNum = si.displayNum; @@ -1257,9 +1259,6 @@ void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, u return; } - unsigned int width, height; - wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); - osg::GraphicsContext::ScreenIdentifier si; si.readDISPLAY(); @@ -1268,6 +1267,9 @@ void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, u si.screenNum = screenNum; + unsigned int width, height; + wsi->getScreenResolution(si, width, height); + osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->hostName = si.hostName; traits->displayNum = si.displayNum;