Show
Ignore:
Timestamp:
02/02/07 23:30:36 (8 years ago)
Author:
robert
Message:

Convert GraphicsThread/GraphicsOperation? to more generic OperationsThread/Operation?.
This paves the way to running cull traversals in seperate threads.

Updated wrappers

Files:
1 modified

Legend:

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

    r6067 r6088  
    13551355} 
    13561356 
    1357 class CompileStateCallback : public osg::GraphicsOperation 
     1357class CompileStateCallback : public osg::Operation 
    13581358{ 
    13591359    public: 
    13601360        CompileStateCallback(GameEventHandler* eh): 
    1361             osg::GraphicsOperation("CompileStateCallback", false), 
     1361            osg::Operation("CompileStateCallback", false), 
    13621362            _gameEventHandler(eh) {} 
    13631363         
    1364         virtual void operator()(osg::GraphicsContext* gc) 
    1365         {  
    1366             // OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); 
     1364        virtual void operator () (osg::Object* object) 
     1365        { 
     1366            osg::GraphicsContext* context = dynamic_cast<osg::GraphicsContext*>(object); 
     1367            if (!context) return; 
    13671368 
    13681369            if (_gameEventHandler) 
    13691370            { 
    1370                 _gameEventHandler->compileGLObjects(*gc->getState()); 
     1371                _gameEventHandler->compileGLObjects(*(context->getState())); 
    13711372            } 
    13721373        }