Hi Preet, Performance optimization is huge topic, that's been covered many many times in the OSG community so have a search through the archives.
One small pointer that might help is for modern hardware is to prefer using a single DrawElementsUShort primitive set with GL_TRIANGLES rather than separate fans or tri strips. Use of VBO's will generally be useful, but profile it for your application and hardware. Robert. On 21 July 2012 10:19, Preet <prismatic.proj...@gmail.com> wrote: > Hiya, > > I have a scene that contains a large number of relatively simple > geometries. As the number of objects displayed increases, the > rendering time for the scene goes up sharply. These objects are > dynamically added and removed from the scene but the geometry itself > is static. > > Each geometrical object is an extruded profile. It's first tessellated > by osgUtil::Tessellator, and then I extrude the triangulated faces out > a certain height. The result is two primitive sets, a GL_TRIANGLE_FAN > from the tessellator and a bunch of GL_TRIANGLES that I manually > create for the extrusion. I add these both as primitive sets with > osg::DrawArrays. I doubt any of these geometries have more than 100 > triangles -- most probably have less than a quarter of that. > > I'd like some advice regarding how I can improve rendering speed in > this situation. I think that the two calls to DrawArrays per geometry > is part of the problem. It might help if I could merge both parts in > the geometry as one set of indexed triangles but I'm not really sure > that would make a huge difference. Should I be using DrawArrays or > DrawElements? Should I be using VBOs? > > > Preet > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org