Added int return type of Viewer::run().

This commit is contained in:
Robert Osfield 2007-01-05 13:16:24 +00:00
parent 348fc7bdb3
commit fc07efa656
2 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
* Also calls realize() if the viewer is not already realized,
* and installs trackball manipulator if one is not already assigned.
*/
virtual void run();
virtual int run();
/** Render a complete new frame.
* Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameRenderingTraversals(). */

View File

@ -66,13 +66,13 @@ bool Viewer::isRealized() const
return numRealizedWindows > 0;
}
void Viewer::run()
int Viewer::run()
{
// if we don't have any scene graph assigned then just return
if (!getSceneData())
{
osg::notify(osg::NOTICE)<<"Warning: Viewer::run() called without a scene graph being assigned to the viewer, cannot run."<<std::endl;
return;
return 1;
}
if (!getCameraManipulator())
@ -89,6 +89,8 @@ void Viewer::run()
{
frame();
}
return 0;
}
void Viewer::setThreadingModel(ThreadingModel threadingModel)