Hi,
so basically I have this problem: I have an OSG program that is supposed to
edit a 3D model (only positions of vertices) in real time. Right now I have
this code:
Graphic initialization function:
{
...
ref_ptr<Geometry> mesh = new Geometry();
mesh->setVertexArray(vertices); // Pre-computed Vec3Array of initial positions
}
Real Time Update Function (is called every frame):
{
...
// Here I change some of the positions in "vertices"
mesh->setVertexArray(vertices);
}
So my problem is this: I edit the positions of vertices in real time and then
have to assign the new array to osg::Geometry object, which is drawn afterwards.
Calling the "setVertexArray" every frame, however, brings the frame rate down
dramatically, which isn't very acceptable.
Is there a way to change vertices' positions in real time more effectively?
Thank you!
Cheers,
Simon
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32593#32593
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org