From 0e39c129b73e6e3a0628b065d01c19e0ee865b46 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 14 Oct 2017 09:06:37 +0100 Subject: [PATCH] Changed the precision setting of #pargma(tic) shader composition define setup to address GLES compatibility issues --- src/osgText/Text.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 54cd841c1..8e213d15c 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -66,6 +66,7 @@ Text::~Text() } #include +#include osg::StateSet* Text::createStateSet() { @@ -75,6 +76,8 @@ osg::StateSet* Text::createStateSet() Font::StateSets& statesets = activeFont->getCachedStateSets(); std::stringstream ss; + ss<getGlyphTextureFeatures()!=GlyphTexture::GREYSCALE) { + ss<getTextureWidthHint(); + ss << float(activeFont->getTextureWidthHint()); defineList["TEXTURE_DIMENSION"] = osg::StateSet::DefinePair(ss.str(), osg::StateAttribute::ON); defineList["SIGNED_DISTNACE_FIELD"] = osg::StateSet::DefinePair("1", osg::StateAttribute::ON);