[osg-users] Nvidia Windows7 Dual Monitor Setup
Hi, while running the OSG examples with the OSGViewer I have a very strange effect on my machine. The screen is split between my two monitors, but in the wrong order, e.g. for the cow.osg example the first part is rendered to the left screen and the end part of the cow is rendered to the right screen. In other words the cow is split in the wrong way. This holds for any example, can sombody give me a quick hint, how to fix this ? Thank you! Cheers, Tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38533#38533 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Nvidia Windows7 Dual Monitor Setup
Hi Tim, while running the OSG examples with the OSGViewer I have a very strange effect on my machine. The screen is split between my two monitors, but in the wrong order, e.g. for the cow.osg example the first part is rendered to the left screen and the end part of the cow is rendered to the right screen. In other words the cow is split in the wrong way. This holds for any example, can sombody give me a quick hint, how to fix this ? I've seen this effect as well, and it seems to me that it's just because of the way OSG queries the screens. It doesn't seem to consider the relative positions of the screens at all, it will just always place screen 0 left-most, screen 1 to the right of that, screen 2 to the right again and so on. It will always do a horizontal arrangement of all screens, i.e. a Nx1 arrangement for N screens. So in particular, if your screens are say 2x2 (2 video cards with 2 screens each, placed in a square 2 screens high and 2 wide), and even though it's configured that way in Windows, OSG won't see it and will still think it's a 4x1 arrangement. So yes, OSG's out-of-the-box support for multiple screens (especially relative positions) could be better. But I haven't had time to do anything about it myself. Ultimately, if you want to place the screens the way you want, you're better off making it configurable in your app (similar to the Displays control panel where you can drag screens around to place them relative to each other). It could be just a config file to achieve the same effect. Or you could code up a proper query of screen geometry and positions through Windows APIs and automatically place viewports on that. I've done this for our own software, and it's a bit complex but once you've figured it out it's definitely useful. I wish I could just transpose that code directly into OSG but it's not possible at present. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Nvidia Windows7 Dual Monitor Setup
Hi, thanks a lot for the fast and detailed answer! Glad that you confirm my intuition on this one. So where does the init happen ? (I am not talking about fixing the osgviewer) Where would be the place to start fixing this in osg itself so that it runs as expected out-of-the-box ? The situation on my side is even worse, since e.g. the cow.osg is not just split in the wrong way, but the events from the mouse are only recognized on the first screen. Cheers, Tim Skylark wrote: Hi Tim, while running the OSG examples with the OSGViewer I have a very strange effect on my machine. The screen is split between my two monitors, but in the wrong order, e.g. for the cow.osg example the first part is rendered to the left screen and the end part of the cow is rendered to the right screen. In other words the cow is split in the wrong way. This holds for any example, can sombody give me a quick hint, how to fix this ? I've seen this effect as well, and it seems to me that it's just because of the way OSG queries the screens. It doesn't seem to consider the relative positions of the screens at all, it will just always place screen 0 left-most, screen 1 to the right of that, screen 2 to the right again and so on. It will always do a horizontal arrangement of all screens, i.e. a Nx1 arrangement for N screens. So in particular, if your screens are say 2x2 (2 video cards with 2 screens each, placed in a square 2 screens high and 2 wide), and even though it's configured that way in Windows, OSG won't see it and will still think it's a 4x1 arrangement. So yes, OSG's out-of-the-box support for multiple screens (especially relative positions) could be better. But I haven't had time to do anything about it myself. Ultimately, if you want to place the screens the way you want, you're better off making it configurable in your app (similar to the Displays control panel where you can drag screens around to place them relative to each other). It could be just a config file to achieve the same effect. Or you could code up a proper query of screen geometry and positions through Windows APIs and automatically place viewports on that. I've done this for our own software, and it's a bit complex but once you've figured it out it's definitely useful. I wish I could just transpose that code directly into OSG but it's not possible at present. Hope this helps, J-S -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38541#38541 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Nvidia Windows7 Dual Monitor Setup
Hi Tim, Glad that you confirm my intuition on this one. So where does the init happen ? (I am not talking about fixing the osgviewer) Where would be the place to start fixing this in osg itself so that it runs as expected out-of-the-box ? Have a look at the osgViewer::View::setUpViewAcrossAllScreens() method. It just loops through the avaiable screens in order (if you have 2 screens it will loop for(i=0;i2;++i) ) and sets up a view on each, with a translation along X in the view and projection matrices. So that's how you can see that it's making a horizontal arrangement with all screens in numerical order from left to right. The situation on my side is even worse, since e.g. the cow.osg is not just split in the wrong way, but the events from the mouse are only recognized on the first screen. I have only seen that with old drivers. What video card are you using? On nvidia cards at least, with recent drivers this doesn't happen anymore. Also flashing that used to occur a lot with fullscreen OSG windows doesn't happen as much with recent drivers. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org