Show
Ignore:
Timestamp:
01/31/10 19:24:01 (3 years ago)
Author:
robert
Message:

Build fixes for build without ref_ptr<> automatic type conversion

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.cpp

    r11032 r11034  
    281281    // (ivStateStack is used to track the state that is not accessible by 
    282282    // SoCallbackAction functions) 
    283     ivStateStack.push(IvStateItem(ivRootNode, osgRootNode)); 
     283    ivStateStack.push(IvStateItem(ivRootNode, osgRootNode.get())); 
    284284 
    285285    // Create callback actions for the inventor nodes 
     
    512512 
    513513        // Get osgStateRoot (note: we HAVE TO reference it) 
    514         osg::Group *stateRoot = ivState.osgStateRoot; 
    515         osg::ref_ptr<osg::Group> r = stateRoot; 
    516 /*    assert(strcmp(stateRoot->className(), "Group") == 0 && 
    517            "IvStateStack osg graph is expected to be " 
    518            "headed by osg::Group"); 
    519         if (stateRoot->getNumChildren() == 1) { 
    520             r = stateRoot->getChild(0)->asGroup(); 
    521             osg::notify(osg::FATAL) << stateRoot->className() << std::endl; 
    522             osg::notify(osg::FATAL) << stateRoot->getChild(0)->className() << std::endl; 
    523             exit(0); 
    524             assert(r != NULL && "Node must be group."); 
    525         }*/ 
     514        osg::ref_ptr<osg::Group> r = ivState.osgStateRoot; 
    526515 
    527516        // Pop state 
     
    539528        // APPEND_AT_PUSH 
    540529        if (!(ivState.flags & IvStateItem::APPEND_AT_PUSH)) 
    541             appendNode(r, action); 
     530            appendNode(r.get(), action); 
    542531 
    543532    } while (multipop); 
     
    12291218    } 
    12301219 
    1231     return osgProgram->addShader(osgShader); 
     1220    return osgProgram->addShader(osgShader.get()); 
    12321221} 
    12331222#endif // INVENTOR_SHADERS_AVAILABLE