[osg-users] modifying vertexs

Robert Osfield robert.osfield at gmail.com
Fri Mar 6 00:55:29 PST 2009


Hi Jim,

I'm confused by your email and your code segment, so not really sure
what to comment on.

Robert.

On Fri, Mar 6, 2009 at 2:56 AM, Jim Brooks <jimblist at gmail.com> wrote:
> 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 at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list