Re: [osg-users] How can I define the screen which show me my viewer?
Hi Martin, I get the number of screens with the following lines: _wsi = _gc->getWindowingSystemInterface(); std::cout << "Detected Screens: " << _wsi->getNumScreens() << std::endl; My question is: How can I define the screen which show me my viewer? If you're creating your window yourself using osg::GraphicsContext::createGraphicsContext, Nick's suggestion is the right track - you'll need to specify the screen you want in the Traits you pass to createGraphicsContext. If you're not, then the Viewer is probably creating the graphics context / window for you (using the osgViewer::View::setUpView*() methods). You can use osgViewer::View::setUpViewOnSingleScreen(screenNum) to get the equivalent behavior but be able to specify the screen you want. This will give you a fullscreen viewer - if you want it in a window use osgViewer::View::setUpViewInWindow(x,y,w,h,screenNum). You can also check out the code for these methods if you're curious. They're there for convenience, if you want total flexibility you'll probably want to inspire yourself from the code there and create your graphics contexts yourself. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I define the screen which show me my viewer?
Hi LittleG, you can control the screen which OSG should use with the env variable OSG_SCREEN You could set this env variable in your software with putenv. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28773#28773 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I define the screen which show me my viewer?
looks in the traits for setup your viewer. osgcompositeviewer example shows usage of traits -Nick 2010/6/10 Martin Großer > Hello, > > I get the number of screens with the following lines: > > _wsi = _gc->getWindowingSystemInterface(); > std::cout << "Detected Screens: " << _wsi->getNumScreens() << std::endl; > > My question is: How can I define the screen which show me my viewer? > > Cheers > > Martin > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How can I define the screen which show me my viewer?
Hello, I get the number of screens with the following lines: _wsi = _gc->getWindowingSystemInterface(); std::cout << "Detected Screens: " << _wsi->getNumScreens() << std::endl; My question is: How can I define the screen which show me my viewer? Cheers Martin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org