Show
Ignore:
Timestamp:
07/19/04 20:56:42 (10 years ago)
Author:
robert
Message:

Fixed the position of text so it is drawn ontop of the quads.

Files:
1 modified

Legend:

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

    r2244 r3156  
    154154        void rebuild_client_area(const Rect &client_rect) 
    155155        { 
     156                float zPos = -0.1; // note from Robert, was 0.1f, but now must be -0.1f to keep text visible??#!? due 
     157                                   // to some other change in the OSG not tracked down yet... 
     158         
    156159                osg::ref_ptr<osgText::Font> arial = osgText::readFontFile("fonts/arial.ttf"); 
    157160 
     
    162165                hints->setCharacterSize(13); 
    163166                hints->setFontResolution(13, 13); 
    164                 hints->setPosition(osg::Vec3((client_rect.x0+client_rect.x1)/2, client_rect.y0 + 4, 0.1f)); 
     167                hints->setPosition(osg::Vec3((client_rect.x0+client_rect.x1)/2, client_rect.y0 + 4, zPos)); 
    165168                hints->setText("<RETURN> show/hide this panel      <LEFT> previous effect      <RIGHT> next effect      <DEL> enable/disable effects      'x' save to file      'r' rotate/stop"); 
    166169                addDrawable(hints.get()); 
     
    194197                ename->setCharacterSize(32); 
    195198                ename->setFontResolution(32, 32); 
    196                 ename->setPosition(osg::Vec3((client_rect.x0 + client_rect.x1) / 2, client_rect.y1 - 22, 0.1f)); 
     199                ename->setPosition(osg::Vec3((client_rect.x0 + client_rect.x1) / 2, client_rect.y1 - 22, zPos)); 
    197200                ename->setText(effect_name); 
    198201                addDrawable(ename.get()); 
     
    205208                edesc->setCharacterSize(16); 
    206209                edesc->setFontResolution(16, 16); 
    207                 edesc->setPosition(osg::Vec3(client_rect.x0 + 8, client_rect.y1 - 60, 0.1f)); 
     210                edesc->setPosition(osg::Vec3(client_rect.x0 + 8, client_rect.y1 - 60, zPos)); 
    208211                edesc->setText(effect_description); 
    209212                addDrawable(edesc.get());