Show
Ignore:
Timestamp:
12/18/14 10:24:46 (less than one hour ago)
Author:
robert
Message:

From Sukender, "Added options to the FBX writer: an ascii/binary switch, and the ability to select FBX version as the SDK handles it (Ex: "FBX201300").

This allows the user to achieve backward compatibility, and debug format issues using text output."

Files:
1 modified

Legend:

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

    r13496 r13497  
    1717*/ 
    1818 
     19#include <osg/Config> 
     20#ifndef OSG_USE_DEPRECATED_GEOMETRY_METHODS  
    1921#define OSG_USE_DEPRECATED_GEOMETRY_METHODS 1 
     22#endif 
    2023 
    2124#include <osg/Geometry> 
     
    247250 
    248251    // load the nodes from the commandline arguments. 
    249     osg::Node* model = osgDB::readNodeFiles(arguments); 
     252    osg::ref_ptr<osg::Node> model = osgDB::readNodeFiles(arguments); 
    250253    if (model) 
    251254    { 
     
    254257        // a group then it won't be able to insert an impostor.  We therefore 
    255258        // manually insert an impostor above the model. 
    256         if (dynamic_cast<osg::Group*>(model)==0) 
     259        if (dynamic_cast<osg::Group*>(model.get())==0) 
    257260        { 
    258261            const osg::BoundingSphere& bs = model->getBound(); 
     
    263266 
    264267                // standard LOD settings 
    265                 impostor->addChild(model); 
     268                impostor->addChild(model.get()); 
    266269                impostor->setRange(0,0.0f,1e7f); 
    267270                impostor->setCenter(bs.center()); 
     
    282285        // on it right now as it requires a getRoots() method to be added to 
    283286        // osg::Node, and we're about to make a release so no new features!  
    284         osg::Group* rootnode = new osg::Group; 
    285         rootnode->addChild(model); 
     287        osg::ref_ptr<osg::Group> rootnode = new osg::Group; 
     288        rootnode->addChild(model.get()); 
    286289 
    287290 
     
    307310 
    308311    // add model to viewer. 
    309     viewer.setSceneData(model); 
     312    viewer.setSceneData(model.get()); 
    310313 
    311314    return viewer.run();