[osg-users] osgWidget now checked into OSG SVN trunk

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Tue Jul 15 12:04:37 PDT 2008

Hi Jeremy,

> Ah, interesting. I always figured I was doing folks a favor by
> hard-coding a small size, but code can certainly be added to have it
> behave as you suggest.

Well, I (and most people with 19 inch monitors) have 1280x1024 native 
resolution, so your window should fill the whole screen, but it's the 
0,0 that actually causes problems. On Windows, if you give (x,y) = 
(0,0), then the top of the window frame is outside the screen so you 
can't drag it to move it! I always found that weird.

In any case, an OSG example should just use the default viewer.run() and 
let the environment variables / command-line args determine how the 
window should look.

And it will actually be less code... Remove that setUpViewInWindow line :-)

> The key is to make sure that the orthographic
> camera is properly resized properly, which should be done by the
> ResizeHandler object.

The ortho camera should be sized appropriately for the screen anyways, 
shouldn't it? I thought that was default OSG behavior...

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com

More information about the osg-users mailing list