Hi,

I've got a simple function which creates a text object and attaches it to a 
Geode:

osg::ref_ptr<osg::Geode>
drawLabels()
{
        osg::ref_ptr<osg::Geode> geode = new osg::Geode;

        osg::ref_ptr<osgText::Font> font = 
osgText::readFontFile("fonts/forte.ttf");
        osg::ref_ptr<osgText::Text> text1 = new osgText::Text;
        text1->setFont(font.get());
        text1->setColor(osg::Vec4(1.0f,0.0f,0.0,1.0f));
        text1->setCharacterSize(200.0f);
        text1->setPosition(osg::Vec3(0.0f,0.0f,0.0f));
        text1->setAxisAlignment(osgText::Text::SCREEN);
        text1->setText("SomeText");


        geode->addDrawable(text1.get());

        return geode.release();
}

Everything works correctly (correct font, size, etc...) except that whatever I 
put in the setColor function call, the text is always black. I tried setting 
GL_LIGHTING to off for the geode but it had no effect.
Any Ideas?

Cheers,
Matthew

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37505#37505





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to