diff --git a/include/osgText/Glyph b/include/osgText/Glyph index 125cf7476..2d1eafa05 100644 --- a/include/osgText/Glyph +++ b/include/osgText/Glyph @@ -100,16 +100,9 @@ public: float texelMargin; }; - void setTextureInfo(ShaderTechnique technique, TextureInfo* info) - { - if (technique>=_textureInfoList.size()) _textureInfoList.resize(technique+1); - _textureInfoList[technique] = info; - } + void setTextureInfo(ShaderTechnique technique, TextureInfo* info); - const TextureInfo* getTextureInfo(ShaderTechnique technique) const - { - return (technique<_textureInfoList.size()) ? _textureInfoList[technique].get() : 0; - } + const TextureInfo* getTextureInfo(ShaderTechnique technique) const; TextureInfo* getOrCreateTextureInfo(ShaderTechnique technique); diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index 7d6c61c1f..599dd6f6e 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -456,12 +456,12 @@ void Font::assignGlyphToGlyphTexture(Glyph* glyph, ShaderTechnique shaderTechniq itr!=_glyphTextureList.end() && !glyphTexture; ++itr) { - if ((*itr)->getSpaceForGlyph(glyph,posX,posY)) glyphTexture = itr->get(); + if ((*itr)->getShaderTechnique()==shaderTechnique && (*itr)->getSpaceForGlyph(glyph,posX,posY)) glyphTexture = itr->get(); } if (glyphTexture) { - //cout << " found space for texture "<