Hi, I have a plane built with 60X60 vertex and I constantly update the alpha channel of these vertex to create a specific effect for my application. When I launch the application, everything runs fine for a while, but comes a time where everything starts to lag.
Do you know why such a thing happens ? I use this code to update alpha channel : // Slowly affect the alpha osg::Vec4Array* colorArray = ((osg::Vec4Array*)myGeometry_->getColorArray()); for( unsigned int i=0; i<colorArray->size(); i++ ) { if( (colorArray->at( i )).a() < 1.0 ) { double alpha = (colorArray->at( i )).a() + alphaIncrement_; if( alpha > 1.0 ) alpha = 1.0; if( alpha >= 0.0 ) (colorArray->at( i ))[3] = alpha; } } myGeometry_->dirtyDisplayList(); thanks Alexandre
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org