is adding unbindElementBufferObject
robertosfield wrote: > 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. > > I don't understand the use case you described. When you're writing about primset that doesn't use EBO, do you refer to DrawArrays? Because if you refer to DrawElements that doesn't use EBO (the else path in "DrawElementsXX::draw's if(ebo)" ) the current code would crash before reaching it ( on state.bindElementBufferObject(ebo) ); And if you're refering as I expect to DrawArrays the fact that there's EBO currently bound there isn't any incidence as the drawArrays call will simply ignore it...?! So to stay simple how can to else path in "DrawElementsXX::draw's if(ebo)" could ever be reached without crashing on state.bindElementBufferObject(ebo) if the precedently drawn primset have ebo attached? robertosfield wrote: > > > 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. > ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67707#67707 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
