To help in the process of isolating and fixing the osgText threading
issues users have seen I have modified the osgtext example to do text
creation in a background thread.  You can now run it via:

  osgtext --mt

What you will see on screen is a box with text strings randomly
appearing/disappearing in the box.

As yet I haven't see any crashes due to the font glyphs being queried
at the same time the text is being updated - which was the point of
the example code...  These are the ones Ewe's changes look like they
might address.

I have also added the stats handler into the example to allow us to
see the performance, but also by coincidence it adds a failure mode -
when you enable stats freetype errors start appearing.  These errors
look to be down to freetype being based around a state model where one
of threads is setting the sizes and current fonts to one thing and the
other thread is try at the same time to set them to another.
Freetype itself might not be thread safe either, but my current feel
is that we might need more than just serializing access to freetype,
we'll need to group several operations at once and serialize these
batches.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to