void dmz::QtPluginViewerOSG::_init (const Config &Local) { _portalName = config_to_string ("portal.name", Local, DefaultPortalNameOSG); #if 0 Config windowData; if (Local.lookup_all_config ("window", windowData)) { ConfigIterator it; Config cd; Boolean found (windowData.get_first_config (it, cd)); if (found) { UInt32 windowLeft = config_to_uint32 ("left", cd); UInt32 windowTop = config_to_uint32 ("top", cd); UInt32 windowWidth = config_to_uint32 ("width", cd); UInt32 windowHeight = config_to_uint32 ("height", cd); UInt32 screen = config_to_uint32 ("screen", cd); __init_viewer_window (windowLeft, windowTop, windowWidth, windowHeight, screen); } _log.info << "Loading viewer windowed" << endl; } else if (Local.lookup_all_config ("fullscreen", windowData)) { ConfigIterator it; Config cd; Boolean found (windowData.get_first_config (it, cd)); if (found) { UInt32 screen = config_to_uint32 ("screen", cd); __init_viewer_fullscreen (screen); } _log.info << "Loading viewer full-screen" << endl; } else { __init_viewer_window (100, 100, 800, 600, 0); _log.info << "Loading viewer windowed with defaults" << endl; } #endif }
void dmz::RenderExtViewerOSG::_init (const Config &Local) { osg::DisplaySettings *ds = osg::DisplaySettings::instance (); if (ds) { ds->setNumMultiSamples (config_to_int32 ("aa.samples", Local, 0)); } _viewerName = config_to_string ("portal.name", Local, _viewerName); _title = config_to_string ("window-title.value", Local, _title); const Boolean Fullscreen = config_to_boolean ("window.fullscreen", Local, False); const Boolean Centered = config_to_boolean ("window.center", Local, True); Int32 windowLeft = config_to_uint32 ("window.left", Local, 100); Int32 windowTop = config_to_uint32 ("window.top", Local, 100); const UInt32 WindowWidth = config_to_uint32 ("window.width", Local, 800); const UInt32 WindowHeight = config_to_uint32 ("window.height", Local, 600); const UInt32 Screen = config_to_uint32 ("window.screen", Local, 0); if (Fullscreen) { __init_viewer_fullscreen (Screen); } else { if (Centered) { __init_centered (Screen, WindowWidth, WindowHeight, windowLeft, windowTop); } __init_viewer_window (windowLeft, windowTop, WindowWidth, WindowHeight, Screen); } _log.info << "Viewer Info: "; if (Fullscreen) { _log.info << "Full Screen: "; } else { _log.info << WindowWidth << "x" << WindowHeight; if (Centered) { _log.info << " [Centered]"; } _log.info << " Corner: " << windowLeft << ", " << windowTop << " Screen: "; } _log.info << Screen << endl; }