Moved rendering support into GraphisContext, osgViewer::Viewer/View, and
added frame stamp updating and update traversal to osgViewer::Scene/Viewer. Updated osgcamera example to use new Viewer API calls instead of using local rendering calls.
This commit is contained in:
@@ -32,27 +32,33 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
/** set up windows and associated threads.*/
|
||||
void realize();
|
||||
|
||||
void setDone(bool done) { _done = done; }
|
||||
|
||||
bool done() { return _done; }
|
||||
|
||||
/** Render a complete new frame.
|
||||
* Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameCullTraversal() and frameDrawTraversal().
|
||||
* Note, no internal makeCurrent() is issued before, or swap buffers called after frame(), these operations are the responsibility of the calling code.*/
|
||||
* Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameRenderingTraversals(). */
|
||||
virtual void frame();
|
||||
|
||||
virtual void frameAdvance();
|
||||
|
||||
virtual void frameEventTraversal();
|
||||
|
||||
virtual void frameUpdateTraversal();
|
||||
virtual void frameCullTraversal();
|
||||
virtual void frameDrawTraversal();
|
||||
|
||||
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();
|
||||
|
||||
/** Clean up all OpenGL objects associated with this viewer's scenegraph. Note, must only be called from the graphics context associated with this viewer.*/
|
||||
/** Clean up all OpenGL objects associated with this viewer's scenegraph.*/
|
||||
virtual void cleanup();
|
||||
|
||||
public:
|
||||
|
||||
void init();
|
||||
bool _firstFrame;
|
||||
bool _done;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user