Hi Robert,

I want to use osgViewer with CullThreadPerCameraDrawThreadPerContext.
when is a safe time to:
change text
add nodes
remove nodes
change a transformation matrix

Do I have to add a separate threading model which adds a synchronization point between the cull, draw and application threads? So that I have a possibility to safely modify the scenegraph?

 Uwe

Robert Osfield wrote:
Hi Ewe,

The OSG is designed so that you don't modify the scene at the same
time as its being read, if you are doing this then this isn't legal
OSG usage.

The use of mutexes to allow to you to modify at the same time as
objects are begin read really isn't 100% either, as this can lead to
data being in an inconsistent state - i.e. cull traversal has rejected
or accepted a text based on its bounding volume, then you go an
changed it during the draw.  The only safe way to this type of
operation is to multi-buffer, and this is another whole can of worms.

There is also the performance aspect of have lots of mutexes that need
to be locked on extra draw, this is really bad for performance on not
something I'm going to merge.

So.... please work out why you are trying to modify the scene graph
while its been drawn and fix this.

Robert.

On 5/18/07, Uwe Woessner <[EMAIL PROTECTED]> wrote:
Hello Robert,

we had occasional coredumps when we dynamically changed text.
When changing text with setText, the font's _ _glyphs list has been
extended while at the same time it has been read during apply in the
draw thread. I protected the list access through a mutex.
See attached Font and Font.cpp.
It should not be too much of a performance issue.
I did not have any more coredumps with Multithreading enabled,  fingers
crossed, I hope this will stay that way.

  Uwe


--

            \\\|/// *HLRS, High Performance Computing Center Stuttgart*
  _I_       ( o o )                *Visualization/VR*             _I_
([EMAIL 
PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL 
PROTECTED])
  | |    Uwe Woessner             [EMAIL PROTECTED]                | |
  | |       .ooo0       http://www.hlrs.de/people/woessner/       | |
  |_|       (   )  Oooo. Phone: +49-711-6856-5790 or ...-5970     |_|
([EMAIL PROTECTED])-------\ (---(   
)-----------------------------------------([EMAIL PROTECTED])
   I          \_)   ) /                                            I
                   (_/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



--

           \\\|/// *HLRS, High Performance Computing Center Stuttgart*
 _I_       ( o o )                *Visualization/VR*             _I_
([EMAIL 
PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL 
PROTECTED])
 | |    Uwe Woessner             [EMAIL PROTECTED]                | |
 | |       .ooo0       http://www.hlrs.de/people/woessner/       | |
 |_|       (   )  Oooo. Phone: +49-711-6856-5790 or ...-5970     |_|
([EMAIL PROTECTED])-------\ (---(   
)-----------------------------------------([EMAIL PROTECTED])
  I          \_)   ) /                                            I
                  (_/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to