Re: [osg-users] Viewer on single screen - other screen black?

2008-02-15 Thread Robert Osfield
Hi J-S,

Which platforms have you seen this problem on?

What happens when you setUpViewInWindow(...)?

Robert.

On Mon, Feb 11, 2008 at 4:52 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hello,

  If I use the osgViewer::View::setUpViewOnSingleScreen() method, the view
  is on the single screen but the other one is black. I would have
  expected that if there is nothing specifically set to occupy the second
  screen, my application would not occupy it so I would see (for example)
  my debugger on it.

  I can reproduce this by simply adding

  viewer.setUpViewOnSingleScreen();

  before viewer.realize() in the osgviewer application's osgviewer.cpp file.

  Not sure if this is a known issue. I thought it was related to something
  we did incorrectly on our side, but it doesn't seem so. We are using OSG
  2.2 here, but it still does the same thing in OSG from SVN.

  Has anyone encountered the same issue, and is there any workaround?
  Could it be related to fullscreen vs windowed mode? I would like
  setUpViewOnSingleScreen to just use the one screen (unless I have
  another view on the other screen of course) and
  setUpViewAcrossAllScreens to use both screens.

  Thanks in advance,

  J-S
  --
  __
  Jean-Sebastien Guay[EMAIL PROTECTED]
 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

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


Re: [osg-users] Viewer on single screen - other screen black?

2008-02-15 Thread Robert Osfield
On Fri, Feb 15, 2008 at 3:09 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hello Robert,


   Which platforms have you seen this problem on?

  Windows XP/Vista.


   What happens when you setUpViewInWindow(...)?

  It's in a window :-)

  I've found a workaround, which is to use setUpViewInWindow(), and once
  it's done, turn off window decorations. I have to adjust the (x,y) and
  (w,h) to account for removing the decorations, but this gives me a nice
  fake fullscreen window on one screen, and I can see my debugger on the
  other.

  So I really think that it's normal behaviour. setUpViewOnSingleScreen
  still sets up the traits with decorations off, which when creating the
  GraphicsWindowWin32 is assumed to mean full screen mode, which will take
  up your two displays. Since you have only a master view on one screen,
  the other one stays black.

This sounds like an issue that GraphicsWindowWin32 needs to take
account of, I can't say what's the best way as I'm no Win32 expert,
having to do funky workarounds is hacky and hardly the type of
behavior that'd we may.  Might it be Win32 full screen is only ever
appropriate when you use all screens on a machine?

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


Re: [osg-users] Viewer on single screen - other screen black?

2008-02-15 Thread Jean-Sébastien Guay
Hello Robert,

 Which platforms have you seen this problem on?

Windows XP/Vista.

 What happens when you setUpViewInWindow(...)?

It's in a window :-)

I've found a workaround, which is to use setUpViewInWindow(), and once 
it's done, turn off window decorations. I have to adjust the (x,y) and 
(w,h) to account for removing the decorations, but this gives me a nice 
fake fullscreen window on one screen, and I can see my debugger on the 
other.

So I really think that it's normal behaviour. setUpViewOnSingleScreen 
still sets up the traits with decorations off, which when creating the 
GraphicsWindowWin32 is assumed to mean full screen mode, which will take 
up your two displays. Since you have only a master view on one screen, 
the other one stays black.

It was just not what I expected, but now that I know, it doesn't really 
matter that much.

Thanks,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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] Viewer on single screen - other screen black?

2008-02-15 Thread Robert Osfield
On Fri, Feb 15, 2008 at 3:44 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
   This sounds like an issue that GraphicsWindowWin32 needs to take
   account of, I can't say what's the best way as I'm no Win32 expert,
   having to do funky workarounds is hacky and hardly the type of
   behavior that'd we may.

  Can I assume then that on Linux you can do setUpViewOnSingleScreen(0)
  and the other screen will be usable (i.e. not black)?

Yes, it does exactly what you would expect it to do, it sets up the
view on a single screen.

   Might it be Win32 full screen is only ever
   appropriate when you use all screens on a machine?

  That's what I think. If your answer to the above is yes, I'd put it down
  to platform differences. It'd be nice to document it in that case. (not
  asking, just saying I'll get to it if I have time :-)

I don't think it should be a case of shrugging ones shoulders and
excepting that Windows doesn't work properly and documenting this.
osgViewer should behave the same on all platforms as far as we can
possibly make it.

If full screen under windows trips windows up so that it grabs all
screens then its something we can only use when osgViewer is running
over all screens, when this isn't the case a borderless full screen
window will probably have to be used.

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


Re: [osg-users] Viewer on single screen - other screen black?

2008-02-15 Thread Jean-Sébastien Guay
Hi Robert,

 I don't think it should be a case of shrugging ones shoulders and
 excepting that Windows doesn't work properly and documenting this.
 osgViewer should behave the same on all platforms as far as we can
 possibly make it.

I'm not saying Windows does not work properly, just it does things 
differently. Policies and driver implementations are different, nothing 
we can do about it.

Though we can hide it, and I agree osgViewer should do the same thing 
(visually) on all platforms.

 If full screen under windows trips windows up so that it grabs all
 screens then its something we can only use when osgViewer is running
 over all screens, when this isn't the case a borderless full screen
 window will probably have to be used.

Before we go and put in a workaround in osgViewer itself for this, let 
me have a look at some documentation and see how GraphicsWindowWin32 is 
implemented. Maybe there's something there that can give some clues.

It seems that the flag windowDecorations in the traits structure is 
what's triggering this. Even if I want to do my borderless window 
workaround, I need to pass the traits with windowDecorations=true when 
creating the window, and then disable them 
(gw-setWindowDecorations(false)) afterwards, otherwise still I get the 
black screen on the other screen.

Also, the fact no one else on Windows has come forward to comment on 
this makes me doubtful. I'm not that familiar with implementing 
windowing on Windows, so it may be some detail I'm not familiar with.

I'll get back to you.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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


[osg-users] Viewer on single screen - other screen black?

2008-02-11 Thread Jean-Sébastien Guay
Hello,

If I use the osgViewer::View::setUpViewOnSingleScreen() method, the view 
is on the single screen but the other one is black. I would have 
expected that if there is nothing specifically set to occupy the second 
screen, my application would not occupy it so I would see (for example) 
my debugger on it.

I can reproduce this by simply adding

 viewer.setUpViewOnSingleScreen();

before viewer.realize() in the osgviewer application's osgviewer.cpp file.

Not sure if this is a known issue. I thought it was related to something 
we did incorrectly on our side, but it doesn't seem so. We are using OSG 
2.2 here, but it still does the same thing in OSG from SVN.

Has anyone encountered the same issue, and is there any workaround? 
Could it be related to fullscreen vs windowed mode? I would like 
setUpViewOnSingleScreen to just use the one screen (unless I have 
another view on the other screen of course) and 
setUpViewAcrossAllScreens to use both screens.

Thanks in advance,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
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