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

Robert Osfield robert.osfield at gmail.com
Tue Apr 25 03:36:53 PDT 2017


Hi Dan,

Could you post the whole modified file+unified path or PR or your
changes so they can be reviewed w.r.t original code.  If there are
changes that might help others then I could check in a patch to the
relevant OSG master/3.2 and 3.4 branches.

Thanks,
Robert.

On 25 April 2017 at 11:18, Daniel Emminizer <emminizer at hotmail.com> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list