[osg-users] Most efficient way to use osg::DrawElementsUInt?

Robert Osfield robert.osfield at gmail.com
Thu Mar 26 06:09:29 PDT 2009


Hi Jasper,

Adding lots of objects in any one frame can easily become a bottleneck
unless you are very careful about it.  I wouldn't expect the push_back on a
DrawElementsUInt to be the primary bottleneck.  Make sure you do all your
benchmarking in release mode as this makes a huge difference.

As to what is your best route forward will depend entirely on what you are
actually trying to do in your application, so perhaps you can explain at a
high level what these geometries represent and why that have to be
introduced on mass on particular frames.  Perhaps then others will be able
to recommend what the best course of action is to take.

Robert.


2009/3/26 Jesper D. Thomsen <jdt at anybodytech.com>

>  Hi all, I'm developing an application where I have to create up to 1000
> osg:geometry objects per frame during certain interaction modes.
> I'm using osg::DrawElementsUInt push_back() to define the geometry
> primitive sets, and this push_back() seems to be the primary bottleneck for
> my applications graphical performance. Is there a more efficient way to
> define the primitive sets than to fill a osg::DrawElementsUInt by push_back
> and add it to the geometry?
>
> This is currently bringing me down to about 1 second per frame, which is
> kind of a roadblock.
>
> regards,
>
>
> Jesper D. Thomsen
>
> * *
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090326/a8502d52/attachment-0003.htm>


More information about the osg-users mailing list