Re: [osg-users] Moving a line and its vertices

2010-03-12 Thread Martin Beckett
You need to dirty the display lists to tell OSG to send the new positions to 
the graphics card


Code:
geometry-dirtyDisplayList();



Or you can set the geometry to dynamic and it will dirty it on each pass.
Can't remember the exact syntax, but search for dynamic.

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25581#25581





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


Re: [osg-users] Moving a line and its vertices

2010-03-12 Thread Tomlinson, Gordon
Hi 

By default OSG will have display list turned on which means the drawing
is cached and thus when you change something it will not be reflected,
if your changing tings a lot you might want to disable display list
alternatively you can tell OSG to rebuild the display list with a call
like myGeometry-dirtyDisplayList();


I would recommend a searching the forum archive as well as this has been
discuss many times and there are many ways in which you could edit
geometry on the fly




Gordon Tomlinson
Product Manager 3d Technology  Project Wyvern
Overwatch(r)
An Operating Unit of Textron Systems

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David
Cofer
Sent: Friday, March 12, 2010 10:46 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Moving a line and its vertices

Hi,

I have created a line in my scene based on the osggeometry example. I
create the line and it displays fine, but I also need to change the
end-points on the line dynamically as the simulation progresses. I
started out by re-setting the vertex array data at each step in the
render loop, but that did nothing. The line stayed exactly where it was
when it was first initialized. I then tried creating a new vertex array
and calling setVertexArray at each step, and this blew up spectacularly
after a few steps. Is there any example of how I am supposed to get my
line and its end points to move dynamically in the simulation? 

Thank you!

Cheers,
David

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25579#25579





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Moving a line and its vertices

2010-03-12 Thread David Cofer
I used some different keyword google searches and ran across this post 
(http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg31811.html). 
Making these changes fixed the problem.

Thanks for the help everyone.
David

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25585#25585





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