From ba62fe4e48ea22c219646436a657a92ab1d34c88 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 7 Nov 2002 15:13:32 +0000 Subject: [PATCH] Titled the view in osganimate and added the title into osgimpostor. --- src/Demos/osganimate/osganimate.cpp | 9 +++++++-- src/Demos/osgimpostor/osgimpostor.cpp | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Demos/osganimate/osganimate.cpp b/src/Demos/osganimate/osganimate.cpp index c09baa551..b3ab2f20c 100644 --- a/src/Demos/osganimate/osganimate.cpp +++ b/src/Demos/osganimate/osganimate.cpp @@ -204,12 +204,17 @@ int main( int argc, char **argv ) osgDB::readCommandLine(commandLine); // load the nodes from the commandline arguments. - osg::Node* rootnode = createModel(); - if (!rootnode) + osg::Node* model = createModel(); + if (!model) { return 1; } + // tilt the scene so the default eye position is looking down on the model. + osg::MatrixTransform* rootnode = new osg::MatrixTransform; + rootnode->setMatrix(osg::Matrix::rotate(osg::inDegrees(30.0f),1.0f,0.0f,0.0f)); + rootnode->addChild(model); + // run optimization over the scene graph osgUtil::Optimizer optimzer; optimzer.optimize(rootnode); diff --git a/src/Demos/osgimpostor/osgimpostor.cpp b/src/Demos/osgimpostor/osgimpostor.cpp index 3f36b71d1..8f0a58a6a 100644 --- a/src/Demos/osgimpostor/osgimpostor.cpp +++ b/src/Demos/osgimpostor/osgimpostor.cpp @@ -219,7 +219,9 @@ void LayoutAsGrid() int main( int argc, char **argv ) { glutInit( &argc, argv ); + osgGLUT::Viewer viewer; + viewer.setWindowTitle(argv[0]); // create the commandline args. std::vector commandLine;