Set osgViewer ReleaseContextAtEndOfFrameHint to false for better performance when in SingleThreaded mode

The flag is normally set to off by default when using Viewer::run() - however since we're using our own frame loop, we have to unset the flag ourselves
coverity_scan^2
scrawl 8 years ago
parent 53e4db8a8f
commit 6d8c414071

@ -615,6 +615,7 @@ void OMW::Engine::go()
assert (!mContentFiles.empty());
mViewer = new osgViewer::Viewer;
mViewer->setReleaseContextAtEndOfFrameHint(false);
osg::ref_ptr<osgViewer::StatsHandler> statshandler = new osgViewer::StatsHandler;
statshandler->setKeyEventTogglesOnScreenStats(osgGA::GUIEventAdapter::KEY_F3);

Loading…
Cancel
Save