[osg-users] Fullscreen with diferent resolutions

2009-04-17 Thread Carlos Sanches
Hi guys !
Now I m trying to display my program in fullscreen mode, but the problem is
that the resolution that is displayed is the same of my screen monitor.
If my monitor is 1280x1024 and I dont put any value to my osgViewer  my
program ll be fullscreen with 1280x1024.
If I put a value to my osgvier likerViewer-setUpViewInWindow( 320, 0,
640, 480 );my program opens in a window.

I wanna that my program run in 640x480 in fullscreen mode and when it finish
back to my desktop at 1280x1024.
Anybody has an idea ?
Thanks
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fullscreen with diferent resolutions

2009-04-17 Thread Stephan Maximilian Huber
Carlos Sanches schrieb:
 Hi guys !
 Now I m trying to display my program in fullscreen mode, but the problem is
 that the resolution that is displayed is the same of my screen monitor.
 If my monitor is 1280x1024 and I dont put any value to my osgViewer  my
 program ll be fullscreen with 1280x1024.
 If I put a value to my osgvier likerViewer-setUpViewInWindow( 320, 0,
 640, 480 );my program opens in a window.
 
 I wanna that my program run in 640x480 in fullscreen mode and when it finish
 back to my desktop at 1280x1024.
 Anybody has an idea ?

you can try some of the provided methods in
osg::GraphicsContext::WindowingSystemInterface

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


Re: [osg-users] Fullscreen with diferent resolutions

2009-04-17 Thread Carlos Sanches
Hi Stephan .
I m looking for some example of
osg::GraphicsContext::WindowingSystemInterface .
Do you know where I found some example of how to use it ?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fullscreen with diferent resolutions

2009-04-17 Thread Stephan Maximilian Huber
Hi Carlos,

Carlos Sanches schrieb:
 I m looking for some example of
 osg::GraphicsContext::WindowingSystemInterface .
 Do you know where I found some example of how to use it ?
Afaik there's no such example.

This works for me: it changes the resolution to 800x600 for Screen 0

osg::GraphicsContext::WindowingSystemInterface* wsi =
osg::GraphicsContext::getWindowingSystemInterface();

if (wsi) {
  wsi-setScreenResolution(0,800,600);  
}

Note: depending on your version of osg there may be a bug in the OS X
implementation of setScreenResolution, a fix for this is not commited yet.

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


Re: [osg-users] Fullscreen with diferent resolutions

2009-04-17 Thread Serge Lages
Be aware that you'll need to manually restore the screen resolution before
exiting your application or you'll find your desktop in 640x480...

On Fri, Apr 17, 2009 at 4:24 PM, Stephan Maximilian Huber 
ratzf...@digitalmind.de wrote:

 Hi Carlos,

 Carlos Sanches schrieb:
  I m looking for some example of
  osg::GraphicsContext::WindowingSystemInterface .
  Do you know where I found some example of how to use it ?
 Afaik there's no such example.

 This works for me: it changes the resolution to 800x600 for Screen 0

 osg::GraphicsContext::WindowingSystemInterface* wsi =
 osg::GraphicsContext::getWindowingSystemInterface();

 if (wsi) {
  wsi-setScreenResolution(0,800,600);
 }

 Note: depending on your version of osg there may be a bug in the OS X
 implementation of setScreenResolution, a fix for this is not commited yet.

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org