Thanks, good explanation. -Paul
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Robert Osfield > Sent: Tuesday, April 03, 2007 2:05 AM > To: osg users > Subject: Re: [osg-users] Controlling the viewport > > Hi Paul, > > When you set up the view you don't set up the window at all, > leaving the viewer itself to call realize(), and the realize > to default to call setUpViewAcrossAllScreens(). Its this > last step that queries the window size and sets up the > cameras to occupy the full screen. > > See the osgcamera example for an example when the windows are > setup up manually and the viewports here arn't full screen. > > Alternatively just call realize() then setViewport(). > > One might propose the question should realize() look at the > camera to see if it has a valid viewport or not and try to > set up a window that fits this, but this might not be what > you'd want, its kinda difficult to know what you want here. > > Robert. > > On 4/2/07, Paul Martz <[EMAIL PROTECTED]> wrote: > > > > > > Robert -- I have a small Viewer-based app that attempts to > control the > > viewport. This doesn't appear to work. Looks like > osgUtil::SceneView, > > used under the hood, is tromping on my viewport. Can you confirm > > that's the problem? If so, is this something that will be > > changed/fixed in the near future? Or how can I set the > viewport from this app? > > int main(int, char **) > > { > > osgViewer::Viewer viewer; > > viewer.setSceneData( osgDB::readNodeFile( "cow.osg" ) ); > > viewer.setCameraManipulator( new osgGA::TrackballManipulator ); > > viewer.getCamera()->setClearColor( osg::Vec4(1.,1.,1.,1.)); > > viewer.getCamera()->setViewport( 0, 0, 512, 512 ); while > > (!viewer.done()) { viewer.frame(); } } > > > > > > Paul Martz > > Skew Matrix Software LLC > > http://www.skew-matrix.com > > 303 859 9466 > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://openscenegraph.net/mailman/listinfo/osg-users > > http://www.openscenegraph.org/ > > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
