Show
Ignore:
Timestamp:
06/03/07 11:34:28 (7 years ago)
Author:
robert
Message:

Added Viewer::setUpViewerAsEmbeddedInWindow convinience method

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgviewerSDL/osgviewerSDL.cpp

    r6815 r6821  
    109109    windowWidth = screen->w; 
    110110    windowHeight = screen->h; 
    111     osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> gw = new osgViewer::GraphicsWindowEmbedded(0,0,windowWidth,windowHeight); 
    112111     
    113112    osgViewer::Viewer viewer; 
    114     viewer.getCamera()->setGraphicsContext(gw.get()); 
    115     viewer.getCamera()->setViewport(new osg::Viewport(0,0,windowWidth,windowHeight)); 
     113    osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> gw = viewer.setUpViewerAsEmbeddedInWindow(0,0,windowWidth,windowHeight); 
    116114    viewer.setSceneData(loadedModel.get()); 
    117115    viewer.setCameraManipulator(new osgGA::TrackballManipulator); 
    118116    viewer.addEventHandler(new osgViewer::StatsHandler); 
    119     viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); 
    120117    viewer.realize(); 
    121118