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;