From ff8b5536a56e5c9cb325a682862eaee7092c281c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 21 Dec 2016 09:10:50 +0000 Subject: [PATCH] Added StateSet::setGlobalDefaults() to fix bug when osgViewer has stats on but no scene graph assigned --- src/osgViewer/StatsHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osgViewer/StatsHandler.cpp b/src/osgViewer/StatsHandler.cpp index e2c373573..eef6d75d8 100644 --- a/src/osgViewer/StatsHandler.cpp +++ b/src/osgViewer/StatsHandler.cpp @@ -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); }