Inside my render loop, I'm updating some geometry based on external events.
When I change a transform (rotation + translate), everything updates fines.
However, if I change vertices directly, nothing happend. Is there a flag that I
need to reset to force the system to recompute the render graph?
Here's the code I use:
// Get vertex array
osg::Vec3Array* pVertices = (osg::Vec3Array*)pGeometry->getVertexArray();
if ( !pVertices )
return;
// Change vertices
(*pVertices)[0].set( xMin, yMax, depth );
(*pVertices)[1].set( xMin, yMin, depth );
(*pVertices)[2].set( xMax_new, yMin, depth );
(*pVertices)[3].set( xMax_new, yMax, depth );
In fact, this only works the first time...No idea why...
Thanks,
- Nick -
_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org