From 6511347d4b0b7111c2ea4bf2233c1cbbeb9fd249 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 2a908a93d..d1e11d4e1 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); }