Show
Ignore:
Timestamp:
11/21/03 15:17:26 (10 years ago)
Author:
robert
Message:

Changed the main to create a Group and then add the loaded scene and HUD scene
into this. This has been done to rework code nearer to what Stephan Huber
used to get round a crash under OSX when a model was passed in. This crash
suggest a problem in dynamic_cast<> perhaps?

Files:
1 modified

Legend:

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

    r1983 r2437  
    202202    osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments); 
    203203 
    204     osg::ref_ptr<osg::Group> group = dynamic_cast<osg::Group*>(scene.get()); 
    205     if (!group) 
    206     { 
    207         group = new osg::Group; 
    208         group->addChild(scene.get()); 
    209     } 
    210  
     204    osg::ref_ptr<osg::Group> group  = new osg::Group; 
     205     
    211206    // add the HUD subgraph.     
     207    if (scene.valid()) group->addChild(scene.get()); 
    212208    group->addChild(createHUD()); 
    213209