HI Martin,

On Fri, Mar 5, 2010 at 4:25 PM, Martin Beckett <[email protected]> wrote:

> Thanks - I think I am misunderstanding the threading in OSG.
> In the gui I though frame() was called at 60fps, eg with a model rotating
> in the view.
>
> If I have a gui thread (say a non-modal dialog) that modifies the scene
> then I need to make sure that I don't have an invalid drawable/vertex array
> combination at any point.
>
> In my own code I was used to having a semaphore that prevented a repaint
> while the data was being modified - but didn't see anything like that in OSG
>
>
You have to either pass a custom operation to the viewer to run at each
frame to do the update, or a callback to make sure the the operation gets
called at the appropriate time for the viewer, or to hold back the
viewer.frame() till after you've made your changes.   Since you control when
frame is called it should be straight forward if you want to add a high
level sync.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to