Hi Julian, I have just reviewed the code and understand the logic of the change, just looking at the local code it's what would seem the appropriate implementation. However, the original code is probably more robust. If you have two adjacent PrimitiveSet within the same osg::Geometry but didn't all use EBO then you'd end up with an EBO being still bound when it shouldn’t be. I realise this case won't be common and will generally be undesirable it's a condition that won't be able to enforce without adding more checks elsewhere.
Since one will normally use VBO and EBO at the same time the code path that the CPU will take will essentially do all the same operations in both the original code and your proposed change, so for normal usage it won't be any more efficient. Given there is a possibility of a bug appearing due to the lack of unbinding between PrimitiveSet I don't feel it would be appropriate to adopt it. Robert. Robert. On 20 June 2016 at 17:50, Julien Valentin <[email protected]> wrote: > Hi, > > not really a bug but an incoherence: > if ebo is NULL it can't be bound as IndexArray (bindElementBufferObject call > ebo->isdirty without any check) > > Thank you! > > Cheers, > Julien > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=67702#67702 > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
