On Thu, Feb 12, 2009 at 7:39 PM, Pecoraro, Alexander N
<[email protected]> wrote:
> Oh yea I forgot that my original solution was to set the osgText objects to 
> DYNAMIC, but when I did that I lost all frame overlap - so the cull and draw 
> were happening as if it was running in single thread mode... not real sure 
> why this happened (perhaps something to do with where the osgText objects 
> were attached to the scene), but then I went with my current solution where I 
> update the text via a mutex and use trylock in the draw callback to prevent 
> blocking it. It seems to work fine - I don't notice any difference in 
> performance with or without my osgText on the screen.

Yes this is predicatable in fact, the lack of frame overlap is there
to prevent you changing the data at the same time as it was being
rendered.

Using a mutex might scale OK for a small number of text fields, but
not to a large number.

Performance wise a better solution would be to implement double buffer
for data structures that are being dynamically updated. This is a
feature for a future rev of the OSG though...

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

Reply via email to