Thanks Robert 
  Now i error is in my DrawableUpdateCallback
   
  void  DrawableUpdateCallback::update(osg::NodeVisitor* nv, osg::Drawable* 
drawable)
{
  osg::Geometry* polyGeom  = dynamic_cast<osg::Geometry* >(drawable);
    colors->push_back(osg::Vec4(1,0,0,1));  .
  polyGeom->setColorArray(colors.get());  
  polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
   
}
  This is ok.
  But when i use 
  {
     
    colors->push_back(osg::Vec4(1,0,0,1));
  polyGeom->setColorArray(colors.get());  
  polyGeom->setColorBinding(osg::Geometry::BIND_PER_VERTEX); 
  }
   
  There is runtime error.That is when i computer my new colors per vertex, I 
can not bind these new color array to my Drawable in DrawableUpdateCallback
   
  Best Regards.
  

Robert Osfield <[EMAIL PROTECTED]> 写道:
  2008/11/9 YangXiao :
> Thanks Robert.
> I confirm model_geode a not NULL,When i convert my model.osg-->model.IVE
> return viewer->run() is OK. Why?

Why? If you can't answer it with all the code in front there is
almostly no way I can answer it without ANY of your code infront of
me. Am I omnipresent? No, I am human being.

My last email indicated that your original email had too little info,
and you follow up email totally lack any of the code that is causing.
Please think about reading the replies. Untill you provide sufficient
information I will not provide any further replies as it's pointless.

Robert.
_______________________________________________
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

Reply via email to