[osg-users] Running a per-frame task on the graphics thread

Robert Osfield robert.osfield at gmail.com
Tue Oct 3 00:10:02 PDT 2017


Hi James,

You can add graphics operations directly to the GraphicsContext and when
GraphicsContext::runOperations() is called from the the draw traversal it
will be called.  You can set whether you want the GraphicsOperation to be
called once and then automatically removed or called on every frame.

The osgViewer::Renderer is an example of GraphicsOperation that is assigned
to window by osgViewer to do the rendering of the scene graphs assigned to
the viewer.  The osgViewer library also manages al the syncronoization of
graphics threads to main threads using GraphicsOperations as well so have a
look how it does things.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171003/653cd06a/attachment-0001.html>


More information about the osg-users mailing list