在研究了怎么样用earth文件来建立地球之后,我开始着手实现很多osgearth学习笔记中的API编程来建立地球。可是我照着其中的例子(
http://blog.csdn.net/whucv/article/details/8474917)做却出现了问题如下所示:
经过半天的查找资料我把 我的程序代码改成了下面所示就成功显示了一个简单的地球。希望大家可以参考一下!
代码:
#include <osgEarth/Map>
#include <osgEarth/MapNode>
#include <osgEarthDrivers/tms/TMSOptions>
#include <osgEarthDrivers/gdal/GDALOptions>
#include <osgViewer/viewer>
using namespace osgEarth;
using namespace osgEarth::Drivers;
int _tmain(int argc, _TCHAR* argv[])
{
osg::ref_ptr<osgViewer::Viewer> viewer=new osgViewer::Viewer();
Map *map=