|
楼主 |
发表于 2011-11-25 22:03:33
|
显示全部楼层
我的代码段:
CString str = L"country.ive";
mafString file = dataDir + str;
osg::ref_ptr<osg::Node> scenceModel = osgDB::readNodeFile(file.GetCharStr());
osg::StateSet* stateset = scenceModel->getOrCreateStateSet();
osg::Texture2D *tex = dynamic_cast<osg::Texture2D*>(stateset->getTextureAttribute(0,osg::StateAttribute::TEXTURE));
tex->setFilter(osg::Texture::MIN_FILTER,osg::Texture:INEAR);
模型是3DMax导出的IVE,scenceModel是加载的节点,为什么会崩掉?是纹理的格式有要求,还是参数写的不对,谢谢。
|
|