[osg-users] Barrier for draw threads?

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Tue Mar 10 12:44:53 PDT 2009


Hi Robert,

I was wondering if there was a way to know when all draw threads for a 
given frame have finished rendering? Since the update traversal for 
frame i+1 can start before the draw traversal of frame i is completed 
(for STATIC objects), we'd like to get some kind of signal to know when 
it's safe to start updating matrices in transforms again.

I know the "good solution" would be to double-buffer the scene graph or 
something like that, but that would require a bit more change in our 
code base than I'd like right now, so I was wondering if there was a 
"quick and easy solution" I could try.

We don't want to run the viewer single threaded because we often have 
multiple views and threading helps a lot there. All we don't want (for 
now) is the fact that a frame's update starts before the end of the 
previous frame's draw.

Thanks in advance,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/



More information about the osg-users mailing list