Hi Robert I will prepare a submission for Geometry changes in order to overcome this issue. Sorry for my repeated posts
mp3butcher wrote: > The only thing I can ensure is the current code fails if you call > setUseVertexBufferObject(true) during runtime (on a geometry that originally > use DisplayLists) > > > > > mp3butcher wrote: > > In all case I tested your usecase in all possibles senses and couldn't find > > what the problem could be... > > > > > > mp3butcher wrote: > > > No don't forget it in fact I'm wrong to believe im wrong > > > > > > mp3butcher wrote: > > > > Oups forget what I tell about my simpification as "else path in > > > > DrawElementsXX::draw's if(ebo)" may only be reached when compiling > > > > DisplayLists.... > > > > > > > > > > > > mp3butcher wrote: > > > > > > > > > > > > > > > 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=67712#67712 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
