- Timestamp:
- 01/31/10 19:24:01 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.cpp
r11032 r11034 281 281 // (ivStateStack is used to track the state that is not accessible by 282 282 // SoCallbackAction functions) 283 ivStateStack.push(IvStateItem(ivRootNode, osgRootNode ));283 ivStateStack.push(IvStateItem(ivRootNode, osgRootNode.get())); 284 284 285 285 // Create callback actions for the inventor nodes … … 512 512 513 513 // 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; 526 515 527 516 // Pop state … … 539 528 // APPEND_AT_PUSH 540 529 if (!(ivState.flags & IvStateItem::APPEND_AT_PUSH)) 541 appendNode(r , action);530 appendNode(r.get(), action); 542 531 543 532 } while (multipop); … … 1229 1218 } 1230 1219 1231 return osgProgram->addShader(osgShader );1220 return osgProgram->addShader(osgShader.get()); 1232 1221 } 1233 1222 #endif // INVENTOR_SHADERS_AVAILABLE
