Titled the view in osganimate and added the title into osgimpostor.

This commit is contained in:
Robert Osfield
2002-11-07 15:13:32 +00:00
parent 2a35dab922
commit ba62fe4e48
2 changed files with 9 additions and 2 deletions

View File

@@ -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);

View File

@@ -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<std::string> commandLine;