Hi Allen,

On 21/5/09 5:47 PM, Allen Saucier wrote:
Has anyone figured out how to draw only the "last" segment that was added?  
I've still
not figured that out and I've got over 15,000 small line segments in my vertex 
array
...
And from what I can tell:
...
just causes the "ALL" the vertices to be redrawn.  Is there a more efficient 
way?  I'd
like to draw only the last "line," which would be the line segment between the 
last
vertex and the new last vertex just added.

OpenGL/OpenSceneGraph always redraws the entire geometry each frame.
There is no such thing as 'existing' (already drawn) geometry.

Does anyone know if there is a way to do that?  Thx!  :)

There isn't. (Well, if your camera doesn't move and the rest of the scene is completely static, you could store the frame and depth buffer of the last frame, load that every time and only draw what has changed. But in your case that's probably not worth the trouble.)

Instead, try to make it as simple as possible for OSG to discard geometry. For example you could batch line segments together (say everything in a 100m radius) so that OSG can cull that Drawable if it's outside the view frustum.

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

Reply via email to