[osg-users] Updating scene properties instead of recreating it each frame
Igor Spiridonov
igwasm at rambler.ru
Mon Jul 2 08:31:34 PDT 2018
Hi dieslower81.
I don't think clearing vector is a problem since it's capacity prevents deallocation/allocation.
I can't just update values since i receive polygons with different number of points. I can try to find a geometry with particular number of points but this approach is not general and i'm not sure about its necessity.
I found the problem in suggested approach. I need to call:
Code:
vertices.dirty();
geometry.dirtyDisplayList();
geometry.dirtyBound();
Looks like even geometry.setDataVariance(osg::Object::DYNAMIC) is not necessary. I'm not sure how much performance i will get but I will keep you posted.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74243#74243
More information about the osg-users
mailing list