Moved enabling/disabling of SDF so it's done regardless of whether a backdrop is used.

This commit is contained in:
Robert Osfield
2017-09-21 14:35:31 +01:00
parent e72a38c8b6
commit 957a7d4e92

View File

@@ -118,17 +118,17 @@ osg::StateSet* Text::createStateSet()
defineList["SHADOW"] = osg::StateSet::DefinePair(ss.str(), osg::StateAttribute::ON);
}
if (_fontSize.second>16)
{
OSG_NOTICE<<"Requesting SDF support _fontSize.second="<<_fontSize.second<<std::endl;
defineList["SIGNED_DISTNACE_FIELD"] = osg::StateSet::DefinePair("1", osg::StateAttribute::ON);
}
else
{
OSG_NOTICE<<"Disabling SDF support _fontSize.second="<<_fontSize.second<<std::endl;
}
}
if (_fontSize.second>8)
{
OSG_NOTICE<<"Requesting SDF support _fontSize.second="<<_fontSize.second<<std::endl;
defineList["SIGNED_DISTNACE_FIELD"] = osg::StateSet::DefinePair("1", osg::StateAttribute::ON);
}
else
{
OSG_NOTICE<<"Disabling SDF support _fontSize.second="<<_fontSize.second<<std::endl;
}
#if 0