<div dir="ltr"><div>Firstly, has anyone noticed that <a href="http://forum.openscenegraph.org">http://forum.openscenegraph.org</a> is basically off-line and has been malfunctioning for some time. The link to the mailing list failed some time ago.<br></div><div><br></div><div>In any case....</div><div><br></div><div>I have noticed a serious performance regression when moving to 3.6.3 from 3.4.0</div><div><br></div><div>It's become such an issue for me, such that I had to revert to 3.4.0.</div><div><br></div><div>The problem starts with
Geometry::addPrimitiveSet
</div><div><br></div><div>Note the commented out
/*if (_useVertexBufferObjects)*/ <br></div><div><br></div>bool Geometry::addPrimitiveSet(PrimitiveSet* primitiveset)<br>{<br> if (primitiveset)<br> {<br><div> /*if (_useVertexBufferObjects)*/ addElementBufferObjectIfRequired(primitiveset);</div><div><br></div><div>
<div>The performance regression happens when adding large numbers of
PrimitiveSet*.</div><div>In 3.4.0 I did not use VBO's for this particular Geometry, but in 3.6.3 one is required to use VBOs for all geometry.<br></div><div><br></div><div>The performance regression is caused by repeated patterns in the VBO code that searches through vectors, an example below. As more and more data is added, the slower the code gets.<br></div><div><br></div><div>unsigned int BufferObject::addBufferData(BufferData* bd)<br>{<br> if (!bd) return 0;<br><br> // check to see if bd exists in BufferObject already, is so return without doing anything<br> for(BufferDataList::iterator itr = _bufferDataList.begin();<br> itr != _bufferDataList.end();<br> ++itr)<br> {<br> if (*itr == bd) return bd->getBufferIndex();<br> }<br></div><div><br></div><div><br></div><div>I can eventually work around the issue, by doing my work to coalesce PrimitiveSets , but might be a FYI for some users.</div><div><br></div><div>Andrew<br></div><div><br></div><div><br></div>
</div></div>