MCPcopy Create free account
hub / github.com/Prograda/Skybolt / createEmbeddedView

Function createEmbeddedView

src/Skybolt/SkyboltVis/Window/EmbeddedWindow.cpp:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13using namespace skybolt::vis;
14
15static 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
27EmbeddedWindow::EmbeddedWindow(const EmbeddedWindowConfig& config) :
28 Window(createEmbeddedView(config.rect))

Callers 1

EmbeddedWindowMethod · 0.85

Calls 2

configureGraphicsStateFunction · 0.85
getCameraMethod · 0.45

Tested by

no test coverage detected