Thanks for the responses, this is the basic code I'm using, there's
more to it but this is the pertinent stuff:

rViewer = new osgViewer::Viewer();
        
wm = new osgWidget::WindowManager(
        rViewer,
        500.0f,
        500.0f,
        MASK_2D,
        osgWidget::WindowManager::PD_NONE);
        
        
osgWidget::Box *box = new osgWidget::Box("vbox1", osgWidget::Box::VERTICAL);
osgWidget::Box *box2 = new osgWidget::Box("vbox2", osgWidget::Box::VERTICAL);
osgWidget::Box *box3 = new osgWidget::Box("vbox3", osgWidget::Box::VERTICAL);

wm->addChild(box);
wm->addChild(box2);
wm->addChild(box3);

rViewer->setUpViewInWindow(500,500, wm->getWidth(), wm->getHeight());
        
cam = wm->createParentOrthoCamera();

osg::ClearNode *backdrop = new osg::ClearNode;
backdrop->setClearColor(osg::Vec4(0.1,0.1,0.5,1.0));
cam->addChild(backdrop);

rViewer->addEventHandler(new osgWidget::MouseHandler(wm));
rViewer->addEventHandler(new osgWidget::KeyboardHandler(wm));

wm->resizeAllWindows();

rViewer->setCameraWithFocus(cam);
rViewer->setSceneData(cam);

rViewer->run();
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to