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

Volckaert, Guy (CA - MTS) Guy.Volckaert at meggitt.com
Tue Apr 25 05:13:21 PDT 2017


I'm using OSG v3.4.0 and I resolved this issue by adding a glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,...) before calling glTexSubImage2D() in glyph.cpp. This problem was occurring if I was using an Intel video driver.

void Glyph::subload() const

    // This line was added to resolve a problem with intel chipsets. In essence, some of the
    // numeric glyphs would not display correctly. They would appear grey or transparent.
    if( getTexture() )
        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, getTexture()->getFilter( osg::Texture::MIN_FILTER ) );


void GlyphTexture::apply(osg::State& state) const
            // This line was added to resolve a problem with intel chipsets. In essence, some of the
            // numeric glyphs would not display correctly. They would appear grey or transparent.
            glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _min_filter);
            // Subload the image once
            glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0,
                    OSGTEXT_GLYPH_FORMAT, GL_UNSIGNED_BYTE, local_data);


-----Original Message-----
From: osg-users [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Tim Hartter
Sent: April-25-17 7:29 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Vanishing letters in osg::Text

Setting OSG_TEXT_INCREMENTAL_SUBLOADING to off does not make a difference and YES it happens on Intel cards (not on Nvidia) (Win 7 OSG 3.4)

Maybe the patched OSG text works better...

Mit AquaMail Android
http://www.aqua-mail.com gesendet

Am 25. April 2017 10:18:21 vorm. schrieb Robert Osfield
<robert.osfield at gmail.com>:

> On 25 April 2017 at 06:34, Wouter Roos <rooswouter at gmail.com> wrote:
>> I've experienced a similar issue lately where we were running a
>> project on lower spec systems with only an integrated GPU. On those
>> systems the frame rate would not show properly, having the same issue
>> as described here, with some numbers not showing properly.
>> I did a test on my laptop, and when I force it to use the integrated
>> GPU
>> (4600) the problems shows up as well. If I switch to use the GTX970M
>> everything is fine again. This is all on Windows 10, osg 3.4.0 I
>> haven't done any further investigation as the project is not using
>> any Text objects, but maybe this might help somehow.
> Some hardware/drivers don't support texture sub-loading correctly so
> the osgText subloading of new glyphs could cause problems, perhaps
> this is what you are seeing.  It's problem that originally occurred on
> Radeon's and some SGI hardware so there is a workaround in osgText
> that detects these combinations in drivers, you can also enable the
> workaround by setting the env var OSG_TEXT_INCREMENTAL_SUBLOADING to
> OFF i.e. under bash you'd do:
>   osgtext
> Under windows I think it's something like:
>   osgtext
> The OSG master version has a had a major rewrite of osgText so it no
> longer uses the texture subloading as may well just work out of the
> box on the Intel GPU/drivers that you have.
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org

osg-users mailing list
osg-users at lists.openscenegraph.org


This e-mail may contain proprietary information and/or copyright material. This e-mail is intended for the use of the addressee only. Any unauthorized use may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately by using the reply facility in your e-mail software.

Information contained in and/or attached to this document may be subject to export control regulations of the European Community, USA, or other countries. Each recipient of this document is responsible to ensure that usage and/or transfer of any information contained in this document complies with all relevant export control regulations. If you are in any doubt about the export control restrictions that apply to this information, please contact the sender immediately.

Be aware that Meggitt may monitor incoming and outgoing e-mails to ensure compliance with the Meggitt IT Use policy.

More information about the osg-users mailing list