Fixed SphericalDisplay set up codes to properly manage display host/num

This commit is contained in:
Robert Osfield
2007-09-28 13:42:41 +00:00
parent 6eccf540e6
commit 7679b96b30

View File

@@ -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<osg::GraphicsContext::Traits> 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<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->hostName = si.hostName;
traits->displayNum = si.displayNum;