Show
Ignore:
Timestamp:
06/27/06 14:05:40 (8 years ago)
Author:
robert
Message:

From Eric Wing, added support for outline/shadow and colour gradient effects.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osglogo/osglogo.cpp

    r4805 r5189  
    166166    text->setText("OpenSceneGraph"); 
    167167 
     168#if 1 
     169    text->setBackdropType(osgText::Text::OUTLINE); 
     170    text->setBackdropOffset(0.05f); 
     171    text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.5f, 1.0f)); 
     172#endif 
     173 
     174 
     175#if 1 
     176    text->setColorGradientMode(osgText::Text::OVERALL); 
     177    osg::Vec4 lightblue(0.30f,0.6f,0.90f,1.0f); 
     178    osg::Vec4 blue(0.10f,0.30f,0.40f,1.0f); 
     179    text->setColorGradientCorners(lightblue, blue, blue, lightblue); 
     180#else 
     181    text->setColorGradientMode(osgText::Text::OVERALL); 
     182    osg::Vec4 light = osg::Vec4(0.0f, 1.0f, 1.0f, 1.0f); 
     183    osg::Vec4 dark = osg::Vec4(0.0f, 0.0f, 0.5f, 1.0f); 
     184    text->setColorGradientCorners(light, dark, dark, light); 
     185//    text->setColorGradientCorners(dark, light, light, dark); 
     186#endif 
     187 
    168188    geode->addDrawable( text ); 
    169189