Hi Dat, The various was that Gordon suggested will give you an few pointers on how to tell an existing osgViewer based application such as osgviewer to open up in different sizes. All of these options effectively give the viewer the default settings to assume when creating the GraphicsWindow.
In your own applications the preferred route may well be to just set up the windows programatically by using Traits by hand and specify the window size you want that way (see the osgcamera or osgwindows examples), or to use the viewer.setUpViewInWindow(x,y,width,height) convenience method. Just making the window size smaller probably won't cut it though, and you may well be forced to change the screen resolution of the display to get the fill rate needs down to a value that your graphics hardware can handle. To change the window resolution you'll need to use WindowingSystemInterface to set the ScreenResolution. i.e. osg::GraphicsContext::WindowSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); wsi->setScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), 480, 320); On exit form your app you'll need to restore the original screen resolution using the above technique, as there isn't any automatic scheme that does this for you. Robert. On Mon, Jun 22, 2009 at 10:42 PM, tien dat<[email protected]> wrote: > Dear all, > I need to run OpenSceneGraph on a hand-held device (a Viliv S5) and it > has a integrated graphics card only. So I want to reduce the > resolution of my application so that the frame rate can be higher > (right now it renders images at 1024x600 and runs at 0.5 fps or less). > Is there a way to tell viewer render pictures at a specified > resolution (doesn't have to be full screen)? > Thanks a lot, > Dat > ------------- > Dat Tien Nguyen > PhD student, Computer Science Department > The University of Iowa, IA 52242 > http://cs.uiowa.edu/~tinguyen > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

