Show
Ignore:
Timestamp:
06/04/07 21:33:59 (7 years ago)
Author:
robert
Message:

Removed setting of font resolutions and added control of threading, with the default
theading set to SingleThreading? to avoid crashes associated with non thread safe
sections of osgFX - the need to be fixed!!!

Files:
1 modified

Legend:

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

    r6051 r6835  
    165165        hints->setAlignment(osgText::Text::CENTER_BOTTOM); 
    166166        hints->setCharacterSize(13); 
    167         hints->setFontResolution(13, 13); 
    168167        hints->setPosition(osg::Vec3((client_rect.x0+client_rect.x1)/2, client_rect.y0 + 4, zPos)); 
    169168        hints->setText("<RETURN> show/hide this panel      <LEFT> previous effect      <RIGHT> next effect      <DEL> enable/disable effects      'x' save to file      'r' rotate/stop"); 
     
    197196        ename->setAlignment(osgText::Text::CENTER_TOP); 
    198197        ename->setCharacterSize(32); 
    199         ename->setFontResolution(32, 32); 
    200198        ename->setPosition(osg::Vec3((client_rect.x0 + client_rect.x1) / 2, client_rect.y1 - 22, zPos)); 
    201199        ename->setText(effect_name); 
     
    208206        edesc->setAlignment(osgText::Text::LEFT_TOP); 
    209207        edesc->setCharacterSize(16); 
    210         edesc->setFontResolution(16, 16); 
    211208        edesc->setPosition(osg::Vec3(client_rect.x0 + 8, client_rect.y1 - 60, zPos)); 
    212209        edesc->setText(effect_description); 
     
    298295    } 
    299296 
     297    osgViewer::Viewer::ThreadingModel threading = osgViewer::Viewer::SingleThreaded; 
     298    while (arguments.read("--SingleThreaded")) threading = osgViewer::Viewer::SingleThreaded; 
     299    while (arguments.read("--CullDrawThreadPerContext")) threading = osgViewer::Viewer::CullDrawThreadPerContext; 
     300    while (arguments.read("--DrawThreadPerContext")) threading = osgViewer::Viewer::DrawThreadPerContext; 
     301    while (arguments.read("--CullThreadPerCameraDrawThreadPerContext")) threading = osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext; 
     302 
     303    viewer.setThreadingModel(threading); 
     304 
    300305    // any option left unread are converted into errors to write out later. 
    301306    arguments.reportRemainingOptionsAsUnrecognized();