|
楼主 |
发表于 2011-11-30 21:48:59
|
显示全部楼层
添加方法与FreeSouth在视频中所讲基本一致。但却花屏
//添加海洋
osg::ref_ptr<osgOcean:: FFTOceanSurface> oceansurface=new osgOcean:: FFTOceanSurface(64,256,17,osg::Vec2f(1.0f,1.0f),12.f,10000.f,0.35f,1e-8,true,2.5,10.f,256);
osg::ref_ptr<osgOcean::OceanScene> oceanscene=new osgOcean::OceanScene(oceansurface.get());
viewer->addEventHandler(oceansurface->getEventHandler());
viewer->addEventHandler(oceanscene->getEventHandler());
root->addChild(oceanscene.get()); |
|