Added new Viewer threading model options

This commit is contained in:
Robert Osfield
2007-02-06 14:38:08 +00:00
parent eeaad74021
commit 3de205ec45
4 changed files with 118 additions and 42 deletions

View File

@@ -53,8 +53,10 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
enum ThreadingModel
{
SingleThreaded,
ThreadPerContext,
ThreadPerCamera
CullDrawThreadPerContext,
DrawThreadPerContext,
CullThreadPerCameraDrawThreadPerContext,
AutomaticSelection
};
/** Set the threading model the rendering traversals will use.*/
@@ -69,6 +71,8 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
/** Get whether the main thread, calling frame(), should be used for the rendering traversals.*/
bool getUseMainThreadForRenderingTraversals() const { return _useMainThreadForRenderingTraversal; }
/** Let the viewer suggest the best threading model for the viewers camera/window setup and the hardware available.*/
ThreadingModel suggestBestThreadingModel();
enum BarrierPosition
{
@@ -178,6 +182,7 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
}
}
bool _firstFrame;
bool _done;