Added StateSet::setGlobalDefaults() to fix bug when osgViewer has stats on but no scene graph assigned

This commit is contained in:
Robert Osfield 2016-12-21 09:10:50 +00:00
parent 38c515a600
commit ff8b5536a5

View File

@ -50,6 +50,7 @@ StatsHandler::StatsHandler():
_lineHeight(1.5f)
{
_camera = new osg::Camera;
_camera->getOrCreateStateSet()->setGlobalDefaults();
_camera->setRenderer(new Renderer(_camera.get()));
_camera->setProjectionResizePolicy(osg::Camera::FIXED);
}