Changeset 6095

Show
Ignore:
Timestamp:
02/05/07 15:56:41
Author:
robert
Message:

Tweak API and updated wrappers to get wrappers to build

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/applications/osgviewer/osgviewer.cpp

    r6040 r6095  
    166166    viewer.addEventHandler(new osgViewer::StatsHandler); 
    167167 
     168 
     169    unsigned int screenNum; 
     170    while (arguments.read("--screen",screenNum)) 
     171    { 
     172        viewer.setUpViewOnSingleScreen(screenNum); 
     173    } 
     174 
    168175    // load the data 
    169176    osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments); 
  • OpenSceneGraph/trunk/genwrapper.conf

    r6094 r6095  
    300300end 
    301301 
    302  
    303302configure reflector "osg::DeleteHandler" 
    304303        object-type 
    305304end 
     305 
     306configure reflector "osg::GraphicsContext" 
     307        object-type 
     308end 
     309 
     310suppress reflector "OpenThreads::Mutex" 
    306311 
    307312############################################################################# 
  • OpenSceneGraph/trunk/include/osg/GraphicsContext

    r6088 r6095  
    183183 
    184184        /** Get the operations queue mutex.*/ 
    185         OpenThreads::Mutex& getOperationsMutex() { return _operationsMutex; } 
     185        OpenThreads::Mutex* getOperationsMutex() { return &_operationsMutex; } 
    186186 
    187187        /** Get the operations queue block used to mark an empty queue, if you end items into the empty queu you must release this block.*/ 
  • OpenSceneGraph/trunk/src/osg/GraphicsThread.cpp

    r6088 r6095  
    214214void OperationsThread::run() 
    215215{ 
    216     bool contextRealizedInThisThread = false; 
    217  
    218216    // make the graphics context current. 
    219217    GraphicsContext* graphicsContext = dynamic_cast<GraphicsContext*>(_parent.get()); 
  • OpenSceneGraph/trunk/src/osgViewer/Viewer.cpp

    r6088 r6095  
    729729        osg::GraphicsContext* gc = (*citr); 
    730730         
    731         OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() ); 
     731        OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) ); 
    732732        osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue(); 
    733733        for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin(); 
     
    759759        osg::GraphicsContext* gc = (*citr); 
    760760         
    761         OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() ); 
     761        OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) ); 
    762762        osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue(); 
    763763        for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin(); 
     
    916916        osg::GraphicsContext* gc = (*citr); 
    917917         
    918         OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() ); 
     918        OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) ); 
    919919        osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue(); 
    920920        for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin(); 
     
    17321732        osg::GraphicsContext* gc = (*itr); 
    17331733         
    1734         OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() ); 
     1734        OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) ); 
    17351735        osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue(); 
    17361736        for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin(); 
  • OpenSceneGraph/trunk/src/osgWrappers/osg/GraphicsContext.cpp

    r6088 r6095  
    3030TYPE_NAME_ALIAS(std::list< osg::Camera * >, osg::GraphicsContext::Cameras); 
    3131 
    32 BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext) 
     32BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext) 
    3333        I_BaseType(osg::Object); 
    3434        I_Method1(void, add, IN, osg::Operation *, operation, 
     
    5656                  "Get the operations queue, not you must use the OperationsMutex when accessing the queue. ", 
    5757                  ""); 
    58         I_Method0(OpenThreads::Mutex &, getOperationsMutex, 
    59                   __OpenThreads_Mutex_R1__getOperationsMutex, 
     58        I_Method0(OpenThreads::Mutex *, getOperationsMutex, 
     59                  __OpenThreads_Mutex_P1__getOperationsMutex, 
    6060                  "Get the operations queue mutex. ", 
    6161                  ""); 
     
    262262                         __osg_Block_P1__getOperationsBlock,  
    263263                         0); 
    264         I_SimpleProperty(OpenThreads::Mutex &, OperationsMutex,  
    265                          __OpenThreads_Mutex_R1__getOperationsMutex,  
     264        I_SimpleProperty(OpenThreads::Mutex *, OperationsMutex,  
     265                         __OpenThreads_Mutex_P1__getOperationsMutex,  
    266266                         0); 
    267267        I_SimpleProperty(osg::GraphicsContext::OperationQueue &, OperationsQueue,