osg 导入模型发黑


1 可能没有法线

flight->getOrCreateStateSet()->setMode(GL_RESCALE_NORMAL, osg::StateAttribute::ON);//给obj增加法线 不加就黑色物体

2 可能没有加光源

mtFlyFlight->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::ON);
mtFlyFlight->getOrCreateStateSet()->setMode(GL_LIGHT0, osg::StateAttribute::ON);
mtFlyFlight->getOrCreateStateSet()->setMode(GL_LIGHT1, osg::StateAttribute::ON);

osg