Found two different ways to tell OSG that vertexs were modified.
Maybe these are circumventions that aren't proper (?).

What is the "one right way"?
Call dirtyDisplayList() ?

ctor()
:       mVertexs(new osg::Vec3Array),
        mDrawArray(new osg::DrawArrays( osg::PrimitiveSet::POINTS,0,0))
{
}

void AddParticle( const osg::Vec3& v )
{
        mVertexs->push_back( v );

#if REGULAR_OPENGL_POINTS
    mDrawArray->setCount( mVertexs->size() );
#endif

#if POINT_SPRITES
// Passing same vertex array causes update.
        mGeom->setVertexArray( mVertexs.get() );
#endif

}
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to