|
using namespace osgEarth;
using namespace osgEarth:rivers;
int _tmain(int argc, _TCHAR* argv[])
{
osg::ref_ptr<osgViewer::Viewer> viewer=new osgViewer::Viewer();
osg::ref_ptr<osg::Group> root=new osg::Group();
Map *map=new Map;
TMSOptions tms;
tms.url()="E:\\osgearth\\OSG\\data\\world.tif";
ImageLayer *layer=new ImageLayer("world",tms);
map->addImageLayer(layer);
MapNode* mapNode=new MapNode(map);
viewer->setSceneData(mapNode);
viewer->realize();
viewer->run();
return 0;
}
编译时没有错运行时就发现建立地球失败,如下图:
|
|