| 13 | using namespace skybolt::vis; |
| 14 | |
| 15 | static osg::ref_ptr<osgViewer::View> createEmbeddedView(const RectI& rect) |
| 16 | { |
| 17 | osg::ref_ptr<osgViewer::View> view = new osgViewer::View; |
| 18 | |
| 19 | osgViewer::GraphicsWindowEmbedded* context = new osgViewer::GraphicsWindowEmbedded(rect.x, rect.y, rect.width, rect.height); |
| 20 | view->getCamera()->setViewport(new osg::Viewport(rect.x, rect.y, rect.width, rect.height)); |
| 21 | view->getCamera()->setGraphicsContext(context); |
| 22 | |
| 23 | configureGraphicsState(*context); |
| 24 | return view; |
| 25 | } |
| 26 | |
| 27 | EmbeddedWindow::EmbeddedWindow(const EmbeddedWindowConfig& config) : |
| 28 | Window(createEmbeddedView(config.rect)) |
no test coverage detected