> On 4 March 2014 12:17, ttaw <[email protected]> wrote:
> 
>>  hello, everyone.
>>     I am an osg learner in China.Recently, when I read the source code of
>>  osg::Impostor class, something about multi-threading confused me a lot.That
>> is, in the  case of CULL_VISITOR of osg::Impostor::traverse,  no mutex is
>> used to protect the function createImpostorSprite which changes the sprite
>> list. Doesn't it result in a potential crash when multi-cameras are active
>> and CullThreadPerCameraDrawThreadPerContext model is used?
>>     Any discussion is welcome.Thanks.
>>
>
>Internally osgSim::Impostor uses a buffer with one entry per cull visitor
>so that each cull thread doesn't overlap and contend on the same data.
 Do you mean _impostorSpriteListBuffer? As I know, it's a buffer per GC rather 
than one per cull visitor. As there may be multi-cameras linked to a single GC, 
contention may happen. I found no buffer  with one entry per cull visitor in 
Impostor except for that. Could you show me the variable you mentioned like 
this: Class::variablename?Thanks a lot.
  ----------------------
 Wu Zhicheng
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to