On Tue, Feb 26, 2008 at 8:57 PM, Jean-Sébastien Guay
<[EMAIL PROTECTED]> wrote:
>  I just looked at src/osgViewer/GraphicsWindowWin32.cpp and noticed that
>  the Win32WindowingSystem (subclass of
>  osg::GraphicsContext::WindowingSystemInterface) has a method
>  getScreenPosition(si, x, y, w, h) which gives me the information I need
>  (i.e. the relative position of each screen, hence their physical
>  arrangement). In other words, for 2 side-by-side screens, it will return
>
>  screen 1 = 0, 0, 1280, 1024
>  screen 2 = 1280, 0, 1280, 1024
>
>  and for 2 screens one above the other, it will return
>
>  screen 1 = 0, 0, 1280, 1024
>  screen 2 = 0, 1024, 1280, 1024

Have you tested and confirmed that this is the case?  i.e. is it
something we can rely upon?  If so then it would be very useful.

>  The only problem is that this class is not exposed, so I cannot use that
>  method. I could copy the code into my project, but that's unclean, plus
>  I wouldn't get any support for other OSes...
>
>  Assuming the same thing is possible for X and/or MacOS, would it be
>  possible to expose this method in
>  osg::GraphicsContext::WindowingSystemInterface? It would then be
>  possible to get osgViewer to support screen arrangements other than a
>  basic horizontal linear setup, plus it would be nice for applications to
>  use as well :-)

Adding a virtual getScreenPosition to the WindowSystemInterface base
class would be straight forward.  I don't know yet how one would
implement it under X11, but it should be possible.

Given the above then the next tweak of
View::setUpViewAcrossAllScreens() could then take this info, but...
only if its actually implemented so we'd need a fallback.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to