[osg-users] Adding primitiveset in runtime

Robert Osfield robert.osfield at gmail.com
Fri May 4 06:29:03 PDT 2018


Hi Sergio,

If you are dynamically changing data on an osg::Geometry make sure you
switch off display lists, as it's typically very expensive in OpenGL
to rebuild display lists.

   geometry->setUseDislayLists(false);

Robert.

On 1 May 2018 at 22:13, Tyler Durden <mynewphoneaaaa at gmail.com> wrote:
> Hi,
>
> I'm exploring a quadtree algorithm of my own, having one large vertex array
> and a set of precomputed indices as various DrawEelementUInt instances. During runtime
> ,in order to visualize/hide quadtree nodes, i attach/detach primitiveset
> by calling addPrimitiveSet/removePrimitiveSet to a to an existing
> osg::Geometry.
> Unfortunately i noticed that if quadtree node's size is higher than 64 (or something like that), (that's mean that i have to attach a primitiveset for 64 vertices) i can see a temporary (but noticeable) block on frame rate.
> I like to ask you if this is a correct way to playing with indices at runtime, or if there is some other trick i have to use to speed up attaching indices operation?
>
>
>
>
> Thank you!
>
> Cheers,
> sergio
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73532#73532
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list