Simplified the nameing of updateTraversal etc methods
This commit is contained in:
parent
9dc369eec2
commit
9a4209c61b
@ -63,11 +63,10 @@ class OSGVIEWER_EXPORT SimpleViewer : public virtual osgViewer::GraphicsWindow
|
||||
* Note, no internal makeCurrent() is issued before, or swap buffers called after frame(), these operations are the responsibility of the calling code.*/
|
||||
virtual void frame();
|
||||
|
||||
virtual void frameAdvance();
|
||||
virtual void frameEventTraversal();
|
||||
virtual void frameUpdateTraversal();
|
||||
virtual void frameCullTraversal();
|
||||
virtual void frameDrawTraversal();
|
||||
virtual void advance();
|
||||
virtual void eventTraversal();
|
||||
virtual void updateTraversal();
|
||||
virtual void renderingTraversal();
|
||||
|
||||
/** Release all OpenGL objects associated with this viewer's scenegraph. Note, does not deleted the actual OpenGL objects, it just releases them to the pending GL object delete lists which will need flushing once a valid graphics context is obtained.*/
|
||||
virtual void releaseAllGLObjects();
|
||||
|
@ -69,16 +69,17 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
virtual int run();
|
||||
|
||||
/** Render a complete new frame.
|
||||
* Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameRenderingTraversals(). */
|
||||
* Calls advance(), eventTraversal(), updateTraversal(), renderingTraversals(). */
|
||||
virtual void frame();
|
||||
|
||||
virtual void frameAdvance();
|
||||
virtual void advance();
|
||||
|
||||
virtual void frameEventTraversal();
|
||||
virtual void eventTraversal();
|
||||
|
||||
virtual void frameUpdateTraversal();
|
||||
virtual void updateTraversal();
|
||||
|
||||
virtual void renderingTraversals();
|
||||
|
||||
virtual void frameRenderingTraversals();
|
||||
|
||||
/** Release all OpenGL objects associated with this viewer's scenegraph. Note, does not deleted the actual OpenGL objects, it just releases them to the pending GL object delete lists which will need flushing once a valid graphics context is obtained.*/
|
||||
virtual void releaseAllGLObjects();
|
||||
|
@ -126,14 +126,13 @@ void SimpleViewer::frame()
|
||||
_firstFrame = false;
|
||||
}
|
||||
|
||||
frameAdvance();
|
||||
frameEventTraversal();
|
||||
frameUpdateTraversal();
|
||||
frameCullTraversal();
|
||||
frameDrawTraversal();
|
||||
advance();
|
||||
eventTraversal();
|
||||
updateTraversal();
|
||||
renderingTraversal();
|
||||
}
|
||||
|
||||
void SimpleViewer::frameAdvance()
|
||||
void SimpleViewer::advance()
|
||||
{
|
||||
_frameStamp->setReferenceTime(osg::Timer::instance()->time_s());
|
||||
_frameStamp->setFrameNumber(_frameStamp->getFrameNumber()+1);
|
||||
@ -141,7 +140,7 @@ void SimpleViewer::frameAdvance()
|
||||
_sceneView->setFrameStamp(_frameStamp.get());
|
||||
}
|
||||
|
||||
void SimpleViewer::frameEventTraversal()
|
||||
void SimpleViewer::eventTraversal()
|
||||
{
|
||||
_eventQueue->frame( _frameStamp->getReferenceTime() );
|
||||
|
||||
@ -185,7 +184,7 @@ void SimpleViewer::frameEventTraversal()
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleViewer::frameUpdateTraversal()
|
||||
void SimpleViewer::updateTraversal()
|
||||
{
|
||||
double previousAspectRatio = ( static_cast<double>(_sceneView->getViewport()->width())/
|
||||
static_cast<double>(_sceneView->getViewport()->height()) );
|
||||
@ -245,13 +244,9 @@ void SimpleViewer::frameUpdateTraversal()
|
||||
_sceneView->update();
|
||||
}
|
||||
|
||||
void SimpleViewer::frameCullTraversal()
|
||||
void SimpleViewer::renderingTraversal()
|
||||
{
|
||||
_sceneView->cull();
|
||||
}
|
||||
|
||||
void SimpleViewer::frameDrawTraversal()
|
||||
{
|
||||
_sceneView->draw();
|
||||
|
||||
if (_databasePager.valid())
|
||||
|
@ -529,14 +529,14 @@ void Viewer::frame()
|
||||
|
||||
_firstFrame = false;
|
||||
}
|
||||
frameAdvance();
|
||||
advance();
|
||||
|
||||
frameEventTraversal();
|
||||
frameUpdateTraversal();
|
||||
frameRenderingTraversals();
|
||||
eventTraversal();
|
||||
updateTraversal();
|
||||
renderingTraversals();
|
||||
}
|
||||
|
||||
void Viewer::frameAdvance()
|
||||
void Viewer::advance()
|
||||
{
|
||||
if (_done) return;
|
||||
|
||||
@ -545,7 +545,7 @@ void Viewer::frameAdvance()
|
||||
_scene->frameAdvance();
|
||||
}
|
||||
|
||||
void Viewer::frameEventTraversal()
|
||||
void Viewer::eventTraversal()
|
||||
{
|
||||
if (_done) return;
|
||||
|
||||
@ -802,7 +802,7 @@ void Viewer::frameEventTraversal()
|
||||
|
||||
}
|
||||
|
||||
void Viewer::frameUpdateTraversal()
|
||||
void Viewer::updateTraversal()
|
||||
{
|
||||
if (_done) return;
|
||||
|
||||
@ -816,7 +816,7 @@ void Viewer::frameUpdateTraversal()
|
||||
updateSlaves();
|
||||
}
|
||||
|
||||
void Viewer::frameRenderingTraversals()
|
||||
void Viewer::renderingTraversals()
|
||||
{
|
||||
// check to see if windows are still valid
|
||||
checkWindowStatus();
|
||||
|
Loading…
Reference in New Issue
Block a user