Added StateSet::setGlobalDefaults() to fix bug when osgViewer has stats on but no scene graph assigned
This commit is contained in:
parent
38c515a600
commit
ff8b5536a5
@ -50,6 +50,7 @@ StatsHandler::StatsHandler():
|
|||||||
_lineHeight(1.5f)
|
_lineHeight(1.5f)
|
||||||
{
|
{
|
||||||
_camera = new osg::Camera;
|
_camera = new osg::Camera;
|
||||||
|
_camera->getOrCreateStateSet()->setGlobalDefaults();
|
||||||
_camera->setRenderer(new Renderer(_camera.get()));
|
_camera->setRenderer(new Renderer(_camera.get()));
|
||||||
_camera->setProjectionResizePolicy(osg::Camera::FIXED);
|
_camera->setProjectionResizePolicy(osg::Camera::FIXED);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user