Shifted set up of osgText related StateSet from osgText::Font into into osg::TextBase/Text to enable grater control over state required for specific Text implementations
This commit is contained in:
@@ -50,7 +50,6 @@ TextBase::TextBase():
|
||||
_lineCount(0),
|
||||
_glyphNormalized(false)
|
||||
{
|
||||
setStateSet(Font::getDefaultFont()->getStateSet());
|
||||
setUseDisplayList(false);
|
||||
setSupportsDisplayList(false);
|
||||
|
||||
@@ -89,6 +88,11 @@ TextBase::~TextBase()
|
||||
{
|
||||
}
|
||||
|
||||
osg::StateSet* TextBase::createStateSet()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TextBase::initArraysAndBuffers()
|
||||
{
|
||||
_vbo = new osg::VertexBufferObject;
|
||||
@@ -182,6 +186,10 @@ void TextBase::setColor(const osg::Vec4& color)
|
||||
_color = color;
|
||||
}
|
||||
|
||||
void TextBase::assignStateSet()
|
||||
{
|
||||
setStateSet(createStateSet());
|
||||
}
|
||||
|
||||
void TextBase::setFont(osg::ref_ptr<Font> font)
|
||||
{
|
||||
@@ -189,6 +197,8 @@ void TextBase::setFont(osg::ref_ptr<Font> font)
|
||||
|
||||
_font = font;
|
||||
|
||||
assignStateSet();
|
||||
|
||||
computeGlyphRepresentation();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user