Hi Sebastian

Thank you for your help. Yes i don't see the glyphs. I use osgEarth, but this 
should not be a problem :)

I've tried the following according your sample:


Code:

ControlCanvas* canvas = ControlCanvas::getOrCreate( view );
    
view->getCamera()->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(true);
    
view->getCamera()->getGraphicsContext()->getState()->setUseVertexAttributeAliasing(true);
    
    osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
    osg::ref_ptr<osg::Image> image = new osg::Image();
    image->allocateImage(512, 512, 1, GL_RGBA, GL_UNSIGNED_BYTE);
    
    texture->setImage(image);

    view->getCamera()->getOrCreateStateSet()->setTextureAttributeAndModes(0, 
texture, osg::StateAttribute::ON);
    
    LabelControl* label = new LabelControl();
    osg::Program* textProgramObject = new osg::Program;
    osg::Shader* textVertexObject =
    new osg::Shader( osg::Shader::VERTEX );
    osg::Shader* textFragmentObject =
    new osg::Shader( osg::Shader::FRAGMENT );
    textProgramObject->addShader( textFragmentObject );
    textProgramObject->addShader( textVertexObject );
    textFragmentObject->setShaderSource(frag);
    textVertexObject->setShaderSource(vert);
    label->getOrCreateStateSet()->setAttributeAndModes(textProgramObject, 
osg::StateAttribute::ON);
    
    label->setTextBackdropType(osgText::Text::BackdropType::NONE);
    
label->setTextBackdropImplementation(osgText::Text::BackdropImplementation::DELAYED_DEPTH_WRITES);
    
    label->setBackColor( Color( Color::Black, 0.8 ) );
    label->setHorizAlign( Control::ALIGN_RIGHT );
    label->setVertAlign( Control::ALIGN_BOTTOM );
    label->setVisible( true );





But i don't see any glyphs.

Cheers,
Remo[/code]

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to