Reworked the state management within osgText::Text and osgText::Font so that it

only applies textures locally rather than whole StateSet.
This commit is contained in:
Robert Osfield
2006-08-02 21:05:56 +00:00
parent b81cea3963
commit 9e7b07fbcf
4 changed files with 15 additions and 39 deletions

View File

@@ -479,12 +479,12 @@ public:
const LineNumbers& getLineNumbers() const { return _lineNumbers; }
};
typedef std::map<osg::ref_ptr<osg::StateSet>,GlyphQuads> TextureGlyphQuadMap;
typedef std::map<osg::ref_ptr<Font::GlyphTexture>,GlyphQuads> TextureGlyphQuadMap;
/** Direct Access to GlyphQuads */
const GlyphQuads* getGlyphQuads(osg::StateSet* stateSet) const
const GlyphQuads* getGlyphQuads(Font::GlyphTexture* texture) const
{
TextureGlyphQuadMap::iterator itGlyphQuad = _textureGlyphQuadMap.find(stateSet);
TextureGlyphQuadMap::iterator itGlyphQuad = _textureGlyphQuadMap.find(texture);
if (itGlyphQuad == _textureGlyphQuadMap.end()) return NULL;
return &itGlyphQuad->second;