Hi Julian,

On 25 June 2016 at 11:09, Julien Valentin <[email protected]> wrote:
> Hi Robert
> Would a StateSet::setBufferIndexBinding(int,stateattribute,mode)
> based on the same pattern as TextureAttribute would be a proper solution?

No, we don't need yet another way to expand the StaetSet API for a
specific GL implementation detail.

StateSet already supports the TypeMemberPair as a key, this has worked
well for osg::ClipLane and osg::Light since the very days of the OSG.
BufferIndexBinding already used this.

Out of curiousity I just looked at the Light and ClipPlane
implementations and they have the same workaround that you went for
for keeping the StateSet consistent.  Jikes.  Everything I said before
still holds so these classes are broken w.r.t threading.

Just spotted the Hint class has the same hacky re-assignment.

Clearly this is wider issue in the OSG that I need to fix.

I will need to review all of these classes.  If I can't work out a
thread safe fix then at minimum I'll add a
StateAttribrubte::reassignToParents() method to at least consolidate
this mess in one place rather than have it spread out over multiple
classes...

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

Reply via email to