Restructed the way that GlyphTexture is set up to better support control of osgText::ShaderTechnique from osgText::Text
This commit is contained in:
@@ -153,12 +153,12 @@ struct TextSettings
|
||||
font->setMinFilterHint(minFilter);
|
||||
font->setMagFilterHint(magFilter);
|
||||
font->setMaxAnisotropy(maxAnisotropy);
|
||||
font->setShaderTechnique(shaderTechnique);
|
||||
|
||||
text.setColor(textColor);
|
||||
text.setBackdropType(backdropType);
|
||||
text.setBackdropOffset(backdropOffset.x(), backdropOffset.y());
|
||||
text.setBackdropColor(backdropColor);
|
||||
text.setShaderTechnique(shaderTechnique);
|
||||
|
||||
text.setFont(font.get());
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ osg:: Node* createTextBelow(const osg::BoundingBox& bb, const std::string& label
|
||||
|
||||
if (s_useSDF)
|
||||
{
|
||||
text->getFont()->setShaderTechnique(osgText::ALL_FEATURES);
|
||||
text->setShaderTechnique(osgText::ALL_FEATURES);
|
||||
}
|
||||
|
||||
text->setAlignment(osgText::Text::CENTER_CENTER);
|
||||
@@ -186,7 +186,7 @@ osg:: Node* createTextLeft(const osg::BoundingBox& bb, const std::string& label,
|
||||
|
||||
if (s_useSDF)
|
||||
{
|
||||
text->getFont()->setShaderTechnique(osgText::ALL_FEATURES);
|
||||
text->setShaderTechnique(osgText::ALL_FEATURES);
|
||||
}
|
||||
|
||||
text->setAlignment(osgText::Text::RIGHT_CENTER);
|
||||
|
||||
Reference in New Issue
Block a user