Hi Morné, I'd recommend just using one osg::Geometry and update it on every frame. You can use either VBO's or vertex arrays on the osg::Geometry, but don't use display lists as their creation will be a gating factor.
Also allocate the max number of vertices you expect to use up front, then just adjust the number primitive you draw using osg::DrawArrays(GL_LINES,numPoints); The 1.9x. / SVN version of the OSG has better VBO updating support so it now can better handle dynamic data as per your needs. Do all this and you'll find you framerates back where they belong as both update, cull and draw dispatch and draw GPU will all be lighter. Robert. On 6/1/07, Morné Pistorius <[EMAIL PROTECTED]> wrote:
Hi, I am trying to visualise interest points in an image by drawing them as a '+' on top of the image. I used osg::Geometry to just draw the two single lines for every interest point, but it seems really slow. The image is updated on every frame from a webcam, so the interest points change on every frame. I draw around 200 - 500 such interest points in the frame. I first tried creating 500 separate geodes, each with a single drawable that I position at the right place with an osg::PositionAttitudeTransform. These were all added to a group which I update on every frame, but it is running really slow ( I blame the interest points, because if they are removed by culling, the scene updates quite fast, but as soon as they come in to view again, it slows down to a crawl). I also tried to just generate a single geode with 500 drawables positioned appropriately but it is still slow. Before I moved to OSG, I was able to draw them at full framerate using standard OpenGL, so there must be some cotcha in OSG that I didn't pick up on. I based my geometry on somthing similar to the osggeometry example. Any help would be greatly appreciated! Thank you kindly, Morne _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/