From b001e8d36d93f430f4f17b3a795a989990c9da03 Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Tue, 25 Apr 2017 07:22:16 -0400 Subject: [PATCH] osgText::Glyph: Explicitly set GL_TEXTURE_MIN_FILTER to address disappearing glyphs on some Intel cards. --- src/osgText/Glyph.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osgText/Glyph.cpp b/src/osgText/Glyph.cpp index 27566ff4a..2d433d566 100644 --- a/src/osgText/Glyph.cpp +++ b/src/osgText/Glyph.cpp @@ -373,6 +373,7 @@ void GlyphTexture::apply(osg::State& state) const glyphsWereSubloading.clear(); glPixelStorei(GL_UNPACK_ALIGNMENT,1); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, getFilter(osg::Texture::MIN_FILTER)); #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth()); @@ -517,6 +518,10 @@ void Glyph::subload() const #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) glPixelStorei(GL_UNPACK_ROW_LENGTH,getRowLength()); #endif + 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); glTexSubImage2D(GL_TEXTURE_2D,0, _texturePosX,_texturePosY,