Hi Jeremy,

On 27 August 2012 17:34, Jeremy Moles <cubic...@gmail.com> wrote:
> You can (and in fact you have to!), but it won't set the dirty flags of
> the parent Geode, so you're forced to call dirtyBound() on it as well.
> This can be tough to do because you need to be sure it has already
> compiled the Paths, which is why I made the initial post.

Interesting issue...

The thing to be careful about allow a const dirtyBound() is that it
opens the door to multi-threading issues where multiple threads could
call dirty at one time - for instance from multiple cull traversals
all running at the same time.  There is also the problem that calling
dirtyBound() would force a computeBound() on the next getBound() call
which again could present a multi-threading issue where multiple
threads could potentially be reading and writing from the data
structures.

Now... if the drawable can only be managed from a single context or
from a single cull thread at one time then this multi-threading issue
wouldn't be an issue, but it's a restriction that is very domain
specific.

Rather than relax the core OSG for a niche case might the better
solution just to cast away constness from your subclass with a note
that it should just be used on single thread cull. There might be a
better solution down the line but for now this is route I'd prefer to
take.

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

Reply via email to