[osg-users] Nvidia Windows7 Dual Monitor Setup

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Sun Apr 17 13:39:26 PDT 2011


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 Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                     http://whitestar02.dyndns-web.com/



More information about the osg-users mailing list