Start the viewer in a window

The planet viewer defaults to full screen mode. To start in a window, traverse the cameras in the viewer and set a flag. In this process you can also set the window size.

   // construct the viewer.
   osgProducer::Viewer viewer = new osgProducer::Viewer(arguments);
   // set up the value with sensible default event handlers.
   viewer->setUpViewer( ... );
   // disable full screen
   for (unsigned int camIndex = 0; 
        camIndex < viewer->getNumberOfCameras();
      Producer::Camera *cam = viewer->getCamera(camIndex);
      Producer::RenderSurface* rs = cam->getRenderSurface();
      rs->setWindowRectangle(100, 200, 640, 480);
Last modified 15 years ago Last modified on May 14, 2007, 9:56:29 AM
Note: See TracWiki for help on using the wiki.