Re: [osg-users] window position and size
you caj also use the environment variable OSG_WINDOW, e.g.: set OSG_WINDOW = 40 40 640 480 Note: space delimited. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44341#44341 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] window position and size
Hi Guy, To set the size and position of a window you use the osgViewer::GraphicsWindow method: /** Set the window's position and size.*/ void setWindowRectangle(int x, int y, int width, int height) The GraphicsContext::resized() method only informs the context that the window has been resized and that it needs to update it's cameras aspect ratios/viewports. Robert. On Tue, Jun 30, 2009 at 1:14 AM, Guy Volckaertguy.volcka...@meggitt.com wrote: Hi, I've implemented the osg::GraphicsContext::ResizedCallback to get notified when the user resizes the window via the mouse. That work perfectly. However, I also need to change the window size programatically (when the user presses a button, for example). I tried calling osg::GraphicsContext::resized() function, but that does not always work. Apart from calling ::SetWindowPos(), is there an osg call that allow the windows position and size to be adjusted? Guy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14668#14668 ___ 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] window position and size
You're the man!!! Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14697#14697 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] window position and size
Hi, I've implemented the osg::GraphicsContext::ResizedCallback to get notified when the user resizes the window via the mouse. That work perfectly. However, I also need to change the window size programatically (when the user presses a button, for example). I tried calling osg::GraphicsContext::resized() function, but that does not always work. Apart from calling ::SetWindowPos(), is there an osg call that allow the windows position and size to be adjusted? Guy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14668#14668 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org