Replaced .osg with .osgt file usage

This commit is contained in:
Robert Osfield
2011-06-14 16:54:20 +00:00
parent 2c2234d68b
commit d18250da59
50 changed files with 127 additions and 128 deletions

View File

@@ -147,7 +147,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
osg::Group* model = new osg::Group;
osg::Node* glider = osgDB::readNodeFile("glider.osg");
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
if (glider)
{
const osg::BoundingSphere& bs = glider->getBound();
@@ -168,7 +168,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
model->addChild(xform);
}
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();

View File

@@ -142,7 +142,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessnafire.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessnafire.osgt");
if (!loadedModel)
{

View File

@@ -172,7 +172,7 @@ int main( int argc, char **argv )
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readNodeFile("cow.osg");
if (!rootnode) rootnode = osgDB::readNodeFile("cow.osgt");
if (!rootnode)
{

View File

@@ -331,7 +331,7 @@ int main( int argc, char **argv )
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
if (!loadedModel)
{

View File

@@ -1440,7 +1440,7 @@ int main( int argc, char **argv )
rootNode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
//osgDB::writeNodeFile(*rootNode,"test.osg");
//osgDB::writeNodeFile(*rootNode,"test.osgt");
// for some reason osgcatch is hanging on exit inside the new TextureObject clean up code when the it's
// run as multi-threaded view, switching to SingleThreaded cures this.

View File

@@ -121,7 +121,7 @@ int main( int argc, char **argv )
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
if (!loadedModel)

View File

@@ -150,7 +150,7 @@ int main( int argc, char **argv )
{
osgViewer::View* view = new osgViewer::View;
view->setName("Single view");
view->setSceneData(osgDB::readNodeFile("fountain.osg"));
view->setSceneData(osgDB::readNodeFile("fountain.osgt"));
view->addEventHandler( new osgViewer::StatsHandler );
@@ -284,7 +284,7 @@ int main( int argc, char **argv )
view->setName("View three");
viewer.addView(view);
view->setSceneData(osgDB::readNodeFile("cessnafire.osg"));
view->setSceneData(osgDB::readNodeFile("cessnafire.osgt"));
view->getCamera()->setName("Cam three");
view->getCamera()->setProjectionMatrixAsPerspective(30.0, double(traits->width) / double(traits->height/2), 1.0, 1000.0);

View File

@@ -234,17 +234,17 @@ int main( int argc, char **argv )
// write out the various scene graphs so that they can be browsed, either
// in an editor or using a graphics diff tool gdiff/xdiff/xxdiff.
std::cout << std::endl << "Writing out the original scene graph as 'original.osg'"<<std::endl;
osgDB::writeNodeFile(*rootnode,"original.osg");
std::cout << std::endl << "Writing out the original scene graph as 'original.osgt'"<<std::endl;
osgDB::writeNodeFile(*rootnode,"original.osgt");
std::cout << std::endl << "Writing out the graph preserving scene graph as 'graph_copy.osg'"<<std::endl;
osgDB::writeNodeFile(*graph_copy,"graph_copy.osg");
std::cout << std::endl << "Writing out the graph preserving scene graph as 'graph_copy.osgt'"<<std::endl;
osgDB::writeNodeFile(*graph_copy,"graph_copy.osgt");
std::cout << "Writing out the deep copied scene graph as 'deep_copy.osg'"<<std::endl;
osgDB::writeNodeFile(*deep_copy,"deep_copy.osg");
std::cout << "Writing out the deep copied scene graph as 'deep_copy.osgt'"<<std::endl;
osgDB::writeNodeFile(*deep_copy,"deep_copy.osgt");
std::cout << "Writing out the shallow copied scene graph as 'shallow_copy.osg'"<<std::endl;
osgDB::writeNodeFile(*shallow_copy,"shallow_copy.osg");
std::cout << "Writing out the shallow copied scene graph as 'shallow_copy.osgt'"<<std::endl;
osgDB::writeNodeFile(*shallow_copy,"shallow_copy.osgt");
// You can use a bit mask to control which parts of the scene graph are shallow copied

View File

@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readNodeFile("cessna.osg");
if (!rootnode) rootnode = osgDB::readNodeFile("cessna.osgt");
if (!rootnode)
{

View File

@@ -97,7 +97,7 @@ int main( int argc, char** argv )
{
osg::ArgumentParser arguments( &argc, argv );
osg::Node* model = osgDB::readNodeFiles( arguments );
if ( !model ) model = osgDB::readNodeFile( "cow.osg" );
if ( !model ) model = osgDB::readNodeFile( "cow.osgt" );
if ( !model )
{
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;

View File

@@ -669,7 +669,7 @@ int main(int argc, char** argv)
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
if (!loadedModel)
{

View File

@@ -142,7 +142,7 @@ int main( int argc, char **argv )
osg::ref_ptr< osg::StateSet > ss = createStateSet();
geode->setStateSet( ss.get() );
// osgDB::writeNodeFile(*geode, "instanced.osg");
// osgDB::writeNodeFile(*geode, "instanced.osgt");
osgViewer::Viewer viewer(arguments);
viewer.setSceneData( geode.get() );

View File

@@ -94,8 +94,8 @@ public:
return true;
}
if (ea.getKey() == 'x') {
osgDB::writeNodeFile(*ep_->getRoot(), "osgfx_model.osg");
std::cout << "written nodes to \"osgfx_model.osg\"\n";
osgDB::writeNodeFile(*ep_->getRoot(), "osgfx_model.osgt");
std::cout << "written nodes to \"osgfx_model.osgt\"\n";
return true;
}
if (ea.getKey() == 'r') {
@@ -339,7 +339,7 @@ int main(int argc, char *argv[])
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
if (!loadedModel)
{

View File

@@ -666,7 +666,7 @@ int main(int, char **)
root->addChild( createScene() );
root->addChild( createBackground() );
//osgDB::writeNodeFile(*root,"geoemtry.osg");
//osgDB::writeNodeFile(*root,"geoemtry.osgt");
osgViewer::Viewer viewer;

View File

@@ -275,7 +275,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default model instead.
if (!scene) scene = osgDB::readNodeFile("dumptruck.osg");
if (!scene) scene = osgDB::readNodeFile("dumptruck.osgt");
if (!scene)

View File

@@ -142,8 +142,8 @@ public:
}
else if (ea.getKey()=='o')
{
osg::notify(osg::NOTICE)<<"Saved model to file 'saved_model.osg'"<<std::endl;
osgDB::writeNodeFile(*(viewer->getSceneData()), "saved_model.osg");
osg::notify(osg::NOTICE)<<"Saved model to file 'saved_model.osgt'"<<std::endl;
osgDB::writeNodeFile(*(viewer->getSceneData()), "saved_model.osgt");
}
else if (ea.getKey()=='p')
{
@@ -325,8 +325,8 @@ public:
if (cmtsv._group->getNumChildren()>0)
{
std::cout<<"Writing selected compoents to 'selected_model.osg'"<<std::endl;
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osg");
std::cout<<"Writing selected compoents to 'selected_model.osgt'"<<std::endl;
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osgt");
}
}
@@ -345,7 +345,7 @@ int main( int argc, char **argv )
if (argc>1) loadedModel = osgDB::readNodeFile(argv[1]);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
if (!loadedModel)
{

View File

@@ -327,7 +327,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osgt");
// create a room made of foor walls, a floor, a roof, and swinging light fitting.
osg::Node* rootnode = createRoom(loadedModel);

View File

@@ -145,7 +145,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("glider.osgt");
if (!loadedModel)
{

View File

@@ -98,7 +98,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
// if no model has been successfully loaded report failure.
if (!loadedModel)

View File

@@ -47,7 +47,7 @@ int main( int argc, char **argv )
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readNodeFile("cessnafire.osg");
if (!rootnode) rootnode = osgDB::readNodeFile("cessnafire.osgt");
if (!rootnode)
{

View File

@@ -91,8 +91,8 @@ bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAct
if (_occluders.valid())
{
if (osgDB::writeNodeFile(*_occluders,"saved_occluders.osg"))
std::cout<<"saved occluders to 'saved_occluders.osg'"<<std::endl;
if (osgDB::writeNodeFile(*_occluders,"saved_occluders.osgt"))
std::cout<<"saved occluders to 'saved_occluders.osgt'"<<std::endl;
}
else
{
@@ -315,7 +315,7 @@ int main( int argc, char **argv )
osg::Node* loadedmodel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try using default mode instead.
if (!loadedmodel) loadedmodel = osgDB::readNodeFile("glider.osg");
if (!loadedmodel) loadedmodel = osgDB::readNodeFile("glider.osgt");
if (!loadedmodel)
{

View File

@@ -24,7 +24,7 @@ int main(int argc, char** argv)
while (arguments.read("--testOcclusion")) { testOcclusion = true; }
// load outlined object
std::string modelFilename = arguments.argc() > 1 ? arguments[1] : "dumptruck.osg";
std::string modelFilename = arguments.argc() > 1 ? arguments[1] : "dumptruck.osgt";
osg::ref_ptr<osg::Node> outlineModel = osgDB::readNodeFile(modelFilename);
if (!outlineModel)
{
@@ -48,7 +48,7 @@ int main(int argc, char** argv)
if (testOcclusion)
{
// load occluder
std::string occludedModelFilename = "cow.osg";
std::string occludedModelFilename = "cow.osgt";
osg::ref_ptr<osg::Node> occludedModel = osgDB::readNodeFile(occludedModelFilename);
if (!occludedModel)
{

View File

@@ -79,7 +79,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
osg::Group* model = new osg::Group;
osg::Node* glider = osgDB::readNodeFile("glider.osg");
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
if (glider)
{
const osg::BoundingSphere& bs = glider->getBound();
@@ -102,7 +102,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
model->addChild(xform);
}
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();

View File

@@ -760,7 +760,7 @@ int main( int argc, char **argv )
if (!rootNode) return 0;
//osgDB::writeNodeFile(*rootNode,"test.osg");
//osgDB::writeNodeFile(*rootNode,"test.osgt");
// set the scene to render
viewer.setSceneData(album->getScene());

View File

@@ -282,7 +282,7 @@ int main( int argc, char **argv )
}
// if not loaded assume no arguments passed in, try use default mode instead.
if (!scene) scene = osgDB::readNodeFile("fountain.osg");
if (!scene) scene = osgDB::readNodeFile("fountain.osgt");
osg::ref_ptr<osg::Group> group = dynamic_cast<osg::Group*>(scene.get());
if (!group)

View File

@@ -298,7 +298,7 @@ int main( int argc, char** argv )
// Construct scene graph
osg::Node* scene = osgDB::readNodeFiles( arguments );
if ( !scene ) scene = osgDB::readNodeFile( "cow.osg" );
if ( !scene ) scene = osgDB::readNodeFile( "cow.osgt" );
if ( !scene )
{
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;

View File

@@ -467,7 +467,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osgt");
if (!loadedModel)
{
@@ -484,7 +484,7 @@ int main( int argc, char **argv )
osg::Group* rootNode = new osg::Group();
rootNode->addChild(createPreRenderSubGraph(loadedModelTransform,tex_width,tex_height, renderImplementation, useImage, useTextureRectangle, useHDR, samples, colorSamples));
osgDB::writeNodeFile(*rootNode, "test.ive");
//osgDB::writeNodeFile(*rootNode, "test.osgb");
// add model to the viewer.
viewer.setSceneData( rootNode );

View File

@@ -340,7 +340,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessna.osgt");
// if no model has been successfully loaded report failure.
if (!loadedModel)
@@ -371,7 +371,7 @@ int main( int argc, char **argv )
// hint to tell viewer to request stencil buffer when setting up windows
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
osgDB::writeNodeFile(*rootNode, "test.osg");
//osgDB::writeNodeFile(*rootNode, "test.osgt");
return viewer.run();

View File

@@ -43,7 +43,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
if (!loadedModel)
{

View File

@@ -134,10 +134,10 @@ osg::Sequence* createSequence(osg::ArgumentParser& arguments)
}
else
{
filenames.push_back("cow.osg");
filenames.push_back("dumptruck.osg");
filenames.push_back("cessna.osg");
filenames.push_back("glider.osg");
filenames.push_back("cow.osgt");
filenames.push_back("dumptruck.osgt");
filenames.push_back("cessna.osgt");
filenames.push_back("glider.osgt");
}
for(Filenames::iterator itr = filenames.begin();

View File

@@ -423,7 +423,7 @@ namespace ModelTwo
osg::Group* model = new osg::Group;
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();
@@ -959,7 +959,7 @@ int main(int argc, char** argv)
}
// osgDB::writeNodeFile(*group,"test.osg");
// osgDB::writeNodeFile(*group,"test.osgt");
while (!viewer.done())
{
@@ -1016,7 +1016,7 @@ int main(int argc, char** argv)
static int dumpFileNo = 0;
dumpFileNo ++;
char filename[256];
std::sprintf( filename, "shadowDump%d.osg", dumpFileNo );
std::sprintf( filename, "shadowDump%d.osgt", dumpFileNo );
osgShadow::MinimalShadowMap * msm = dynamic_cast<osgShadow::MinimalShadowMap*>( shadowedScene->getShadowTechnique() );

View File

@@ -241,7 +241,7 @@ int main( int argc, char **argv )
osgViewer::Viewer viewer(arguments);
std::string outputfile("output.osg");
std::string outputfile("output.osgt");
while (arguments.read("-o",outputfile)) {}
while (arguments.read("-s")) { viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); }
@@ -278,12 +278,12 @@ int main( int argc, char **argv )
group1->setNodeMask(1);
// Uncomment these lines if you like to compare the loaded model to the resulting model in a merge/diff tool
//osgDB::writeNodeFile(*loadedModel.get(), "dummy1.osg");
//osgDB::writeNodeFile(*loadedModel.get(), "dummy1.osgt");
osgDB::writeNodeFile(*loadedModel.get(), outputfile);
osg::ref_ptr<osg::Node> convertedModel = osgDB::readNodeFile(outputfile);
//osgDB::writeNodeFile(*convertedModel.get(), "dummy2.osg");
//osgDB::writeNodeFile(*convertedModel.get(), "dummy2.osgt");
osg::Group* group2 = new osg::Group;
group2->addChild(convertedModel.get());

View File

@@ -102,7 +102,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
// if no model has been successfully loaded report failure.
if (!loadedModel)

View File

@@ -401,7 +401,7 @@ int main(int argc, char **argv)
}
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
double s = 200000.0 / cessna->getBound().radius();
@@ -457,7 +457,7 @@ int main(int argc, char **argv)
}
else
{
std::cout<<"Failed to read cessna.osg"<<std::endl;
std::cout<<"Failed to read cessna.osgt"<<std::endl;
}
}

View File

@@ -183,7 +183,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius, osg::Geode *
osg::Group* model = new osg::Group;
osg::Node* glider = osgDB::readNodeFile("glider.osg");
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
if (glider)
{
const osg::BoundingSphere& bs = glider->getBound();
@@ -236,7 +236,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius, osg::Geode *
model->addChild(xform);
}
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();

View File

@@ -228,7 +228,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
osg::Group* model = new osg::Group;
osg::Node* cessna = osgDB::readNodeFile("cessna.osg");
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
if (cessna)
{
const osg::BoundingSphere& bs = cessna->getBound();

View File

@@ -616,7 +616,7 @@ int main( int argc, char **argv )
if (!onDisk) rootNode = createScene(fileList,texmatLeft,texmatRight,radius,height,length);
else rootNode=new osg::Switch();
//osgDB::writeNodeFile(*rootNode,"test.osg");
//osgDB::writeNodeFile(*rootNode,"test.osgt");

View File

@@ -151,7 +151,7 @@ int main( int argc, char **argv )
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osgt");
if (!loadedModel)
{

View File

@@ -32,7 +32,7 @@
// second View's displayed frustum.
//
// Command line arguments are taken to be models for display. If you
// specify no command line arguments, the code attempts to load cow.osg.
// specify no command line arguments, the code attempts to load cow.osgt.
#include <osg/Geometry>
@@ -147,8 +147,8 @@ main( int argc,
{
// User didn't specify anything, or file(s) didn't exist.
// Try to load the cow...
osg::notify( osg::WARN ) << arguments.getApplicationName() << ": Could not find specified files. Trying \"cow.osg\" instead." << std::endl;
if ( !(scene = osgDB::readNodeFile( std::string( "cow.osg" ) ) ) )
osg::notify( osg::WARN ) << arguments.getApplicationName() << ": Could not find specified files. Trying \"cow.osgt\" instead." << std::endl;
if ( !(scene = osgDB::readNodeFile( std::string( "cow.osgt" ) ) ) )
{
osg::notify( osg::FATAL ) << arguments.getApplicationName() << ": No data loaded." << std::endl;
return 1;

View File

@@ -29,24 +29,24 @@ typedef std::list<std::string> Strings;
Strings strings;
strings.push_back(std::string(""));
strings.push_back(std::string("myfile"));
strings.push_back(std::string(".osg"));
strings.push_back(std::string("myfile.osg"));
strings.push_back(std::string("/myfile.osg"));
strings.push_back(std::string("home/robert/myfile.osg"));
strings.push_back(std::string("/home/robert/myfile.osg"));
strings.push_back(std::string("\\myfile.osg"));
strings.push_back(std::string("home\\robert\\myfile.osg"));
strings.push_back(std::string("\\home\\robert\\myfile.osg"));
strings.push_back(std::string("\\home/robert\\myfile.osg"));
strings.push_back(std::string("\\home\\robert/myfile.osg"));
strings.push_back(std::string(".osgt"));
strings.push_back(std::string("myfile.osgt"));
strings.push_back(std::string("/myfile.osgt"));
strings.push_back(std::string("home/robert/myfile.osgt"));
strings.push_back(std::string("/home/robert/myfile.osgt"));
strings.push_back(std::string("\\myfile.osgt"));
strings.push_back(std::string("home\\robert\\myfile.osgt"));
strings.push_back(std::string("\\home\\robert\\myfile.osgt"));
strings.push_back(std::string("\\home/robert\\myfile.osgt"));
strings.push_back(std::string("\\home\\robert/myfile.osgt"));
strings.push_back(std::string("home/robert/"));
strings.push_back(std::string("\\home\\robert\\"));
strings.push_back(std::string("home/robert/myfile"));
strings.push_back(std::string("\\home\\robert\\myfile"));
strings.push_back(std::string("home/robert/.osg"));
strings.push_back(std::string("\\home\\robert\\.osg"));
strings.push_back(std::string("home/robert/myfile.ext.osg"));
strings.push_back(std::string("home\\robert\\myfile.ext.osg"));
strings.push_back(std::string("home/robert/.osgt"));
strings.push_back(std::string("\\home\\robert\\.osgt"));
strings.push_back(std::string("home/robert/myfile.ext.osgt"));
strings.push_back(std::string("home\\robert\\myfile.ext.osgt"));
for(Strings::iterator itr = strings.begin();
itr != strings.end();

View File

@@ -192,8 +192,8 @@ void runMultiThreadReadTests(int numThreads, osg::ArgumentParser& arguments)
readThread->setStartBarrier(startBarrier.get());
readThread->setEndBarrier(endBarrier.get());
readThread->addFileName("cessna.osg");
readThread->addFileName("glider.osg");
readThread->addFileName("cessna.osgt");
readThread->addFileName("glider.osgt");
readThread->addFileName("town.ive");
readThreads.push_back(readThread.get());

View File

@@ -39,7 +39,7 @@ FOX_OSG_MDIView::FOX_OSG_MDIView(FXMDIClient *p, const FXString &name,
viewer->setKeyEventSetsDone(0);
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osg");
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osgt");
if (!loadedModel)
{
return ;

View File

@@ -20,12 +20,12 @@ public:
{
setThreadingModel(threadingModel);
QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("cow.osg") );
QWidget* widget2 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("glider.osg") );
QWidget* widget3 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("axes.osg") );
QWidget* widget4 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("fountain.osg") );
QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("cow.osgt") );
QWidget* widget2 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("glider.osgt") );
QWidget* widget3 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("axes.osgt") );
QWidget* widget4 = addViewWidget( createCamera(0,0,100,100), osgDB::readNodeFile("fountain.osgt") );
QWidget* popupWidget = addViewWidget( createCamera(900,100,320,240,"Popup window",true),
osgDB::readNodeFile("dumptruck.osg") );
osgDB::readNodeFile("dumptruck.osgt") );
popupWidget->show();
QGridLayout* grid = new QGridLayout;

View File

@@ -112,7 +112,7 @@ int main(int argc, char** argv) {
box4->hide();
osg::Node* model = osgDB::readNodeFile("spaceship.osg");
osg::Node* model = osgDB::readNodeFile("spaceship.osgt");
model->setNodeMask(MASK_3D);

View File

@@ -120,7 +120,7 @@ int main(int argc, char** argv) {
menu->getBackground()->setColor(1.0f, 1.0f, 1.0f, 0.0f);
menu->resizePercent(100.0f);
osg::Node* model = osgDB::readNodeFile("osgcool.osg");
osg::Node* model = osgDB::readNodeFile("osgcool.osgt");
model->setNodeMask(MASK_3D);

View File

@@ -346,7 +346,7 @@ int main(int argc, char** argv)
// AlphaSetterVisitor alpha(.8f);
// frame->accept(alpha);
return osgWidget::createExample(viewer, wm); //osgDB::readNodeFile("cow.osg"));
return osgWidget::createExample(viewer, wm); //osgDB::readNodeFile("cow.osgt"));
}
@@ -674,6 +674,6 @@ int main(int argc, char** argv)
AlphaSetterVisitor alpha(.8f);
frame->accept(alpha);
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osg"));
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osgt"));
}
#endif

View File

@@ -87,5 +87,5 @@ int main(int argc, char** argv) {
wm->addChild(canvas);
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osg"));
return osgWidget::createExample(viewer, wm, osgDB::readNodeFile("cow.osgt"));
}

View File

@@ -157,8 +157,7 @@ int main(int argc, char** argv) {
boxCopy->resizePercent(100.0f, 0.0f);
// Here we demonstrate the use of osgWidget/io_utils. This is really only useful for
// debugging at the moment, but later I'll make it more generic for .osg and .ive
// creation.
// debugging at the moment.
// std::cout << *box << std::endl << *boxCopy << std::endl;
// Setup our OSG objects for our scene; note the use of the utility function
@@ -169,7 +168,7 @@ int main(int argc, char** argv) {
// some of the other examples to see this in action...
osg::Group* group = new osg::Group();
osg::Camera* camera = osgWidget::createOrthoCamera(1280.0f, 1024.0f);
osg::Node* model = osgDB::readNodeFile("cow.osg");
osg::Node* model = osgDB::readNodeFile("cow.osgt");
// Add our event handler; is this better as a MatrixManipulator? Add a few other
// helpful ViewerEventHandlers.

View File

@@ -32,7 +32,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osg");
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
// if no model has been successfully loaded report failure.
if (!loadedModel)