Hi Nick, The OSG by default uses display lists, which are built on the first time the geometry is rendered. If you are dynamically updating geometry then you need to either call geometry->dirtyDisplayLists() or switch them off via geometry->setUseDisplayLists(false);
You will probably also need to call geometry->dirtyBound() to ensure culling works fine. On 9/5/07, Nick Prudent <[EMAIL PROTECTED]> wrote: > > 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 > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

