|
我加载了一个本地shp数据到场景中,加载的shp是中国城市境界的shp数据,数据量不是很大,但是加到场景中帧率下降严重,从原来的60帧直接掉到30帧,下降了整整一半。希望各路大神答疑解惑!
下面是我的加载方法:
Style style;
LineSymbol* ls=style.getOrCreateSymbol<LineSymbol>();
ls->stroke()->color()=Color::Yellow;
ls->stroke()->width()=10.0f;
style.getOrCreate<osgEarth::AltitudeSymbol>()->clamping() = AltitudeSymbol::CLAMP_RELATIVE_TO_TERRAIN;
style.getOrCreate<osgEarth::AltitudeSymbol>()->technique() =osgEarth::AltitudeSymbol::TECHNIQUE_DRAPE;
style.getOrCreate<osgEarth::AltitudeSymbol>()->binding() = osgEarth::AltitudeSymbol::BINDING_VERTEX;
osgEarth:rivers::OGRFeatureOptions featureOptions;
featureOptions.url()="F:\\Progams\\EqVis-2014-3-14\\Debug\\GlobeLocalFiles\\data\\wolddata\\borderprovince\\bou2_4l.shp";
osgEarth::Drivers::FeatureGeomModelOptions geomOptions;
geomOptions.featureOptions()=featureOptions;
geomOptions.styles()=new StyleSheet();
geomOptions.styles()->addStyle(style);
geomOptions.enableLighting()=true;
ModelLayerOptions layerboundryOptions("china_boundry",geomOptions);
m_pMap->addModelLayer(new ModelLayer(layerboundryOptions));
|
|