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:
parent
0b4e7e59bc
commit
e6880de032
1 changed files with 5 additions and 0 deletions
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue