1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:23:54 +00:00

Better fix for wireframe crashes

This commit is contained in:
scrawl 2015-03-19 00:37:33 +01:00
parent 0b4e7e59bc
commit e6880de032

View file

@ -131,6 +131,11 @@ int main(int argc, char** argv)
viewer.realize(); viewer.realize();
viewer.setCameraManipulator(new osgGA::TrackballManipulator()); viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.addEventHandler(new WireframeKeyHandler(root)); viewer.addEventHandler(new WireframeKeyHandler(root));
// We're going to change this from the event callback, set the variance to DYNAMIC so that
// we don't interfere with the draw thread.
root->getOrCreateStateSet()->setDataVariance(osg::Node::DYNAMIC);
viewer.addEventHandler(new osgViewer::StatsHandler); viewer.addEventHandler(new osgViewer::StatsHandler);
while (!viewer.done()) while (!viewer.done())