Merged changes to DisplaySettings from Stephan Huber in prep for controlling the menu hiding behaviour under OSX.
Added new WindowSystemInterface::setDisplaySettings() method to provide a mechanism for passing settings onto the WindowSystemInterface so it can then set up the system appropriately. Added assignment of the DisplaySettings to the WindowSystemInterface in Viewer/ComppsiteViewer::realize().
This commit is contained in:
@@ -520,13 +520,15 @@ void Viewer::realize()
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int maxTexturePoolSize = osg::DisplaySettings::instance()->getMaxTexturePoolSize();
|
||||
if (_camera->getDisplaySettings()) maxTexturePoolSize = std::max(maxTexturePoolSize, _camera->getDisplaySettings()->getMaxTexturePoolSize());
|
||||
if (_displaySettings.valid()) maxTexturePoolSize = std::max(maxTexturePoolSize, _displaySettings->getMaxTexturePoolSize());
|
||||
// get the display settings that will be active for this viewer
|
||||
osg::DisplaySettings* ds = _displaySettings.valid() ? _displaySettings.get() : osg::DisplaySettings::instance().get();
|
||||
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
||||
|
||||
unsigned int maxBufferObjectPoolSize = osg::DisplaySettings::instance()->getMaxBufferObjectPoolSize();
|
||||
if (_displaySettings.valid()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _displaySettings->getMaxBufferObjectPoolSize());
|
||||
if (_camera->getDisplaySettings()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _camera->getDisplaySettings()->getMaxBufferObjectPoolSize());
|
||||
// pass on the display settings to the WindowSystemInterface.
|
||||
if (wsi && wsi->getDisplaySettings()==0) wsi->setDisplaySettings(ds);
|
||||
|
||||
unsigned int maxTexturePoolSize = ds->getMaxTexturePoolSize();
|
||||
unsigned int maxBufferObjectPoolSize = ds->getMaxBufferObjectPoolSize();
|
||||
|
||||
for(Contexts::iterator citr = contexts.begin();
|
||||
citr != contexts.end();
|
||||
|
||||
Reference in New Issue
Block a user