Added int return type of Viewer::run().
This commit is contained in:
parent
348fc7bdb3
commit
fc07efa656
@ -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(). */
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user