安装osg的第三方依赖
sudo apt-get build-dep openscenegraph
安装opengl库
sudo apt-get install mesa-common-dev freeglut3 freeglut3-dev
下载osg源码
git clone https://github.com/openscenegraph/OpenSceneGraph
开始编译
- cmake ..
- make -j12
- sudo make install
执行完成后,需要设置动态库的环境变量
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
添加OSG_FILE_PATH
export OSG_FILE_PATH="/home/aspire/Desktop/OpenSceneGraph-Data-3.0.0"