The code uses btSoftBodyHelper::CreatePatch() to create a soft body with nodes
that match the geometry of the flag. The flag's osg::Geometry is configured to
use a buffer object with GL_DYNAMIC_DRAW usage. During update, an update
callback copies the soft body node data into the Geometry vertex array, and uses
osgUtil::SmoothingVisitor to generate new normals.
Please try this out and post any feedback.
Note that the name "patch-lowlevel" implies that the example is interacting with
Bullet's API directly. We might decide to add OSG-centric helper classes and
utility functions in the future. If you have any input on this, please post your
ideas.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/