Added assignStateSet() to Text::setBackgroundColor()
This commit is contained in:
parent
12904105f8
commit
4b6722ab44
@ -193,9 +193,7 @@ osg:: Node* createTextLeft(const osg::BoundingBox& bb, const std::string& label,
|
|||||||
//text->setColor(osg::Vec4(0.37f,0.48f,0.67f,1.0f)); // Neil's original OSG colour
|
//text->setColor(osg::Vec4(0.37f,0.48f,0.67f,1.0f)); // Neil's original OSG colour
|
||||||
text->setColor(osg::Vec4(0.20f,0.45f,0.60f,1.0f)); // OGL logo colour
|
text->setColor(osg::Vec4(0.20f,0.45f,0.60f,1.0f)); // OGL logo colour
|
||||||
|
|
||||||
text->setBackdropType(osgText::Text::OUTLINE);
|
OSG_NOTICE<<std::endl<<"***** POS A ******"<<std::endl;
|
||||||
text->setBackdropOffset(0.03f);
|
|
||||||
text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.5f, 1.0f));
|
|
||||||
|
|
||||||
if (s_useSDF)
|
if (s_useSDF)
|
||||||
{
|
{
|
||||||
@ -203,6 +201,14 @@ osg:: Node* createTextLeft(const osg::BoundingBox& bb, const std::string& label,
|
|||||||
text->setBackdropImplementation(osgText::Text::USE_SHADERS);
|
text->setBackdropImplementation(osgText::Text::USE_SHADERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OSG_NOTICE<<std::endl<<"***** POS B ******"<<std::endl;
|
||||||
|
|
||||||
|
text->setBackdropType(osgText::Text::OUTLINE);
|
||||||
|
text->setBackdropOffset(0.03f);
|
||||||
|
text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.5f, 1.0f));
|
||||||
|
|
||||||
|
OSG_NOTICE<<std::endl<<"***** POS C ******"<<std::endl;
|
||||||
|
|
||||||
text->setColorGradientMode(osgText::Text::OVERALL);
|
text->setColorGradientMode(osgText::Text::OVERALL);
|
||||||
osg::Vec4 lightblue(0.30f,0.6f,0.90f,1.0f);
|
osg::Vec4 lightblue(0.30f,0.6f,0.90f,1.0f);
|
||||||
osg::Vec4 blue(0.10f,0.30f,0.40f,1.0f);
|
osg::Vec4 blue(0.10f,0.30f,0.40f,1.0f);
|
||||||
|
@ -1507,6 +1507,8 @@ void Text::setBackdropOffset(float horizontal, float vertical)
|
|||||||
void Text::setBackdropColor(const osg::Vec4& color)
|
void Text::setBackdropColor(const osg::Vec4& color)
|
||||||
{
|
{
|
||||||
_backdropColor = color;
|
_backdropColor = color;
|
||||||
|
|
||||||
|
assignStateSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Text::setColorGradientMode(ColorGradientMode mode)
|
void Text::setColorGradientMode(ColorGradientMode mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user