1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

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
This commit is contained in:
scrawl 2017-02-02 22:15:35 +01:00
parent 53e4db8a8f
commit 6d8c414071

View file

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