[osg-users] modifying vertexs

Jim Brooks jimblist at gmail.com
Thu Mar 5 18:56:51 PST 2009


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

}



More information about the osg-users mailing list