一:编译OSG
#sudo vim /etc/apt/sources.list 打开sources.list
#将sources.list里面的deb-src取消注释
#然后执行下面命令
sudo apt-get build-dep openscenegraph
sudo apt-get install libgles2-mesa-dev libfreetype6-dev
sudo apt-get install libjpeg-dev libgstreamer-plugins-base1.0-dev
sudo apt-get install libgdal-dev libsdl2-dev libsdl1.2-dev libtiff-dev
sudo apt-get install zip unzip
sudo apt-get install build-essential pkg-config
#从https://github.com/openscenegraph/OpenSceneGraph 下载代码
#从https://github.com/openscenegraph/OpenSceneGraph-Data 下载样例数据
#然后执行下面命令
cur_path=$(pwd)
cd OpenSceneGraph
osg_path=${cur_path}/OpenSceneGraph
mkdir build
mkdir install
cd build
#cmake .. -DOPENGL_PROFILE=GL3 -DOSG_GL_CONTEXT_VERSION=4.2 -DCMAKE_INSTALL_PREFIX