laksmi 发表于 2016-4-16 17:05:17

未经处理的异常: 0xC0000005: 读取位置 发生冲突

#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
#include <osgParticle/PrecipitationEffect>
#include <osg/Node>

void main()
{
osgViewer::Viewer viewer;
//设置雪花类
osg::ref_ptr<osgParticle::PrecipitationEffect> precipitationEffect = new osgParticle::PrecipitationEffect;
//设置雪花浓度
precipitationEffect->snow(0.5);
//设置雪花颜色
precipitationEffect->setParticleColor(osg::Vec4(1, 1, 1, 1));
//设置风向
precipitationEffect->setWind(osg::Vec3(2, 0, 0));

osg::Group * root = new osg::Group() ;
//把雪花加入到场景结点
root ->addChild(precipitationEffect.get ()) ;
osg::Node* ceep = osgDB::readNodeFile("ceep.ive") ;
root ->addChild(ceep) ;
viewer.setSceneData(root);
viewer.realize();
viewer.run();
}

邵波 发表于 2016-5-5 16:56:26

同样出现这个问题,不知道楼主解决了没?

jevonsea 发表于 2016-5-8 15:57:17

不是报的空指针的问题吗?
页: [1]
查看完整版本: 未经处理的异常: 0xC0000005: 读取位置 发生冲突