HI Zhen, In normal OpenGL/OSG usage VBO+EBO's do not take long to create. Whether osgCuda is the bottleneck or whether it's the crazy number of primitives you trying to add that might be the problem I can't say. I havn't used osgCuda myself so can't comment on this specifically. However, I can say that for best performance with OpenGL applications it's best to keep the number of separate batches of geometry down. Which it be possible to cut the number of primitives sets down to 1 by just using a DrawElementUShort/UInt?
Robert. On Fri, Aug 26, 2011 at 4:31 AM, Zhen Xu <[email protected]> wrote: > Hi, > I find: > if geom->setUseVertexBufferObjects(true), the process of "addPrimitive()" is > also very long. > for example: > osg::Geometry* geometry = new osg::Geometry; > geom->setUseVertexBufferObjects(true) > for (unsigned int i=0;i<60000;i++) > { > geometry->addPrimitiveSet( otherGeometry->getPrimitiveSet(i) ); > } > The running time is also more than 10 minutes. > So I quess, osgCuda::Geometry is creating VBO and EBO when many PrimitiveSets > are added into. > I haven't read the source code about VBO and EBO, and I don't know why the > process of creating VBO and EBO is so long if the number of PrimitiveSets is > large. > > > > Thank you! > > Cheers, > Zhen > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=42249#42249 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

