<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello everyone, I have a problem with osg::Text()</div>
<div>Some letters seem to vanish with depth (see picture) - the "h" in "This is a label.." is vanishing if the text is further away from the camera.</div>
<div> </div>
<div>Do you have any idea what I'm doing wrong?</div>
<div> </div>
<div>This is how I draw the text node: (the font does not matter by the way...)</div>
<div>
<pre> osg::ref_ptr<osg::StateSet> pStateset(new osg::StateSet());
pStateset->setMode(GL_LIGHTING,
osg::StateAttribute::OFF |
osg::StateAttribute::PROTECTED |
osg::StateAttribute::OVERRIDE);
pStateset->setMode(GL_BLEND, osg::StateAttribute::ON);
pStateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
pStateset->setRenderBinDetails(INT_MAX, "RenderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
osg::ref_ptr<osgText::Text> pText( new osgText::Text );
osg::ref_ptr<osg::Geode> pTextGeode ( new osg::Geode );
pText->setFont(pFont);
pText->setText(Text.c_str());
pText->setAutoRotateToScreen(true);
pText->setDrawMode(osgText::Text::TEXT | osgText::Text::FILLEDBOUNDINGBOX);
pText->setBoundingBoxMargin(FontSize * 0.1);
pText->setFontResolution(96, 96);
pText->setCharacterSize(FontSize);
pText->setPosition(Position);
pText->setColor(osg::Vec4d(1,0,0,1));
pText->setStateSet(pStateset.get());
pText->setUseDisplayList(false);
pTextGeode->addDrawable(pText);
pTextGeode->setStateSet(pStateset);
return pTextGeode;</pre>
</div>
<div> </div>
<div>I'd be greatful for any help on the matter.</div>
<div>-Tim-</div>
<div> </div></div></body></html>