[osg-users] [Performance] Update dynamic vertices in drawable by external incoming data

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed Feb 19 06:19:09 PST 2020

Hi Robert,

thank you for your advice about initial setup of a big array. That is a big 

As you said:    *"There a number of ways to go about this type of task, 
which route to take will depend on your needs/hardware available."*

My hardware is a window10 PC with intel i7 8550U CPU and intel Graphics 

Later I will add more objects(e.g bounding box, point cloud maybe) to 
render in my program and I am not aware of how much computation it will 
demand. Could you please point out one link or reference of "a number of 
ways"?  I would really appreciate that.


Am Mittwoch, 19. Februar 2020 14:34:05 UTC+1 schrieb Robert Osfield:
> HI Yuan,
> There a number of ways to go about this type of task, which route to take 
> will depend on your needs/hardware available.
> In principle pass 400-800 points each frame is not a large and should work 
> easily at 60fps without any issues.  One most efficient way to do this is 
> to create an array which is large enough for the maximum number of points 
> you'll need and allocate this at the start, then just fill in the parts of 
> the array that you need, and set the DrawArrays to just reference the 
> portion you need.  For instance you could allocate an osg::Vec3Array of 
> 1000 vertices at setup, then never resize it.  Each time you update the 
> data you'll need to call array->dirty() to force the VBO to be updated.
> Also when doing bechmarking mark sure you are using a release build of the 
> OSG and your application as this can make a huge difference.
> Cheers,
> Robert.

You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/f6a44fc4-9006-43cf-be9c-3ef823815dff%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200219/d43e6c65/attachment.html>

More information about the osg-users mailing list