Hi Martin,

I would use osg::DrawElements* rather DrawArrays, this way you can
change the points you want rendering just by changes the indices in
the list.  It might be more efficient to break the whole clump of
points into ranges, so one DrawElements always handles 0 to 999, next
1000 to 1999, this way you needn't change all the elements.   Also use
VBO's rather than display lists, or just vertex arrays to make the
update more efficient as updating display lists interactively is very
expensive.

Robert.

On Thu, Jan 7, 2010 at 5:18 PM, Martin Beckett <m...@mgbeckett.com> wrote:
> Ok another embarrassingly newbie question.
>
> I have a scene with a large number of points, I want to interactively delete 
> some points.
>
> It's too time consuming to go through the vertex array and remove the values. 
> So in the past in OpenGL I shuffled them with values at the end and changed 
> the displaylist to not draw them - this also means they can be undeleted by 
> simply reseting the display list, but it destroys the order.
>
> Is it sensible/efficent to have multiple DrawArrays to cover the ranges of 
> valid points?
>
> So instead of
>
> Code:
> PrimitiveSets 1
>  {
>  DrawArrays POINTS 0 30000
>  }
>
>
>
>
> If I deleted points 10 100 and 1000 I would have
>
> Code:
>
>  {
>  DrawArrays POINTS 0 9
>  DrawArrays POINTS 11 99
>  DrawArrays POINTS 101 9999
>  .... etc...
>  }
>
>
>
>
> Then I could simply put in the deleted indexes/ranges in an unused primitive 
> set to restore them.
>
> Martin
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=22248#22248
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to