Added StateSet::setGlobalDefaults() to fix bug when osgViewer has stats on but no scene graph assigned
This commit is contained in:
parent
192e654cdb
commit
6511347d4b
@ -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