[osg-users] Vanishing letters in osg::Text

Daniel Emminizer emminizer at hotmail.com
Tue Apr 25 03:18:37 PDT 2017


Hi,

We used to see this problem a lot.  The OSG_TEXT_INCREMENTAL_SUBLOADING advice did not help.  What did help was explicitly setting the GL_TEXTURE_MIN_FILTER at a slightly different place in osgText/Glyph.cpp.

Around line 373 you'll see a call to glPixelStorei() before the glTexSubImage2D() near the bottom of GlyphTexture::apply().  I add the following:

Code:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, getFilter(osg::Texture::MIN_FILTER));




Then around line 517 you'll see another call to glPixelStorei() before glTexSubImage2D() in Glyph::subload().  I add:


Code:

if (_texture)
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _texture->getFilter(osg::Texture::MIN_FILTER));
else
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);




This worked on the Intel cards.  I expect it's some sort of driver bug, but I'm not sure.

I hope this helps.

 - Dan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70829#70829








More information about the osg-users mailing list